Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

PresentationSystemGroup

Syadeu edited this page Oct 21, 2021 · 7 revisions

Namespace: Syadeu.Presentation
File: PresentationSystemGroup.cs

public struct PresentationSystemGroup<T> : IPresentationSystemGroup where T : PresentationGroupEntity

PresentationManager 에서 수행되는 시스템의 그룹입니다.

특정 시스템만 불러오려면 PresentationSystem<T> 으로 호출하세요.

Inheritance: System.Object -> PresentationSystemGroup<T>
Implements: IPresentationSystemGroup

Overview

  • 1

Remarks

struct 로 시스템 그룹을 불러오려면 먼저 시스템 그룹을 정의하여야 합니다. 그룹을 정의하는 방법에 대해서는 PresentationGroupEntity 를 참조하세요.

Description

Examples

아래는 사용자가 수동을 시스템 그룹을 시작하는 방법에 대해 설명합니다.

// 그룹에 등록할 시스템을 먼저 선언합니다.
public sealed class TestSystem : PresentationSystemEntity<TestSystem>
{
    /*
    	Some data works..
    */
}

// 그룹을 선언합니다.
public sealed class TestSystemGroup : PresentationGroupEntity
{
    public override void Register()
    {
        // typeof() 는 매 호출시마다 해당 타입의 정보를
        // 다시 읽어오므로, TypeHelper 를 통해 미리 메모리에 저장된
        // 목표 타입의 정보를 읽어옵니다.
        RegisterSystem(TypeHelper.TypeOf<TestSystem>.Type);
    }
}

public IEnumerator StartGroup()
{
    // 그룹을 시작합니다. PresentationGroupEntity 를 상속받는
    // 시스템 그룹은 자동으로 등록되어 별다른 작업이 필요없습니다.
    // PresentationSystemGroup 을 통해 그룹을 시작하면
    // ICustomYieldAwaiter 를 반환하고, 이는 CoreRoutine 내에서
    // yield 되어 완전히 시작할때까지 기다릴 수 있습니다.
    ICustomYieldAwaiter awaiter = PresentationSystemGroup<TestSystemGroup>.Start();
    
    // 이 예제에서는 UnityEngine.Monobehaviour.StartCorouine으로
    // 시작되었을 때를 가정합니다.
    while (awaiter.KeepWait)
    {
        yield return null;
    }
    
    UnityEngine.Debug.Log($"{nameof(TestSystemGroup)} has started");
}

Static Fields

Name Description
Null

Static Properties

Name Description
Systems 이 그룹에 속한 모든 시스템들의 배열입니다.

Static Methods

Name Description
IsValid() 이 그룹이 유효한지 반환합니다.
Start() 이 그룹을 시작합니다.
Stop() 이 그룹을 정지합니다. 정지 후 이 시스템 그룹의 모든 시스템들은 Dispose 됩니다.
- Interfaces
- Enums
- Attributes
- Abstract Classes
- Classes
- Structs
- Exceptions

- Syadeu.Presentation
- Syadeu.Collections
- Syadeu.Collections.Converters
- Syadeu.Collections.Proxy
- Syadeu.Presentation.Proxy
- Syadeu.Presentation.Internal
- Syadeu.Presentation.Entities
- Syadeu.Presentation.Attributes
- Syadeu.Presentation.Components
- Syadeu.Presentation.Actions
- Syadeu.Presentation.Render
  • CameraData
  • CameraFrustum
  • IntersectionType
  • RenderSystem
  • WorldCanvasSystem
- Syadeu.Presentation.Data
  • DataContainerSystem
  • DataObjectBase
  • EntityAnimationClipEventData
- Syadeu.Presentation.Events

Clone this wiki locally