This repository was archived by the owner on Jul 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
ConsoleWindow
syadeu edited this page Apr 14, 2021
·
1 revision
Namespace: Syadeu.Mono
public sealed class ConsoleWindow : StaticManager<ConsoleWindow>런타임 개발자용 콘솔입니다.
Inheritance: StaticManager<T> -> ConsoleWindow
- 런타임 콘솔 창 입니다.
- 각종 디버깅을 위한 로그 커맨드를 지원합니다.
- 런타임 중, 지정한 명령어를 통해 사용자가 원하는 메소드를 실행 할 수 있습니다.
아래는 사용자가 유니티에서 CommandDefinition 을 생성 후, 내부에 CommandField 를 할당했다는 전제 하에 명령어 등록 방법에 대해 설명합니다.
public void TestMethod(int i)
{
ConsoleWindow.Log($"Input: {i}");
}
public void AddCommand()
{
ConsoleWindow.AddCommand(
(rest) =>
{
// rest 는 명령문을 제외한 나머지 텍스트문을 받아옵니다.
// 이 string 을 활용하면 다음과 같은 변수를 사용자에 의해 지정받아,
// 메소드를 실행 할 수 있습니다.
if (!int.TryParse(rest, out int i))
{
ConsoleWindow.Log($"형식에 맞지않는 입력값: expected => {typeof(int)}");
return;
}
TestMethod(i);
},
// 이 경우, ConsoleDefinition 의 좌표는 testDef 이고,
// 하위 testField 의 명령단에 위의 람다를 할당합니다.
"testDef", "testField");
}위의 예제에서 사용자가 콘솔 명령창에 testDef testField 10 을 입력하였을 때, 콘솔은 다음과 같은 메세지를 표시하게 됩니다.
Input: 10
| Name | Description |
|---|---|
| OnErrorReceived | 에러가 전달되었을 때 실행하는 이벤트 delegate 입니다. |
| Name | Description |
|---|---|
| Opened | 이 콘솔창이 현재 열려있는지 반환합니다. |
| Name | Description |
|---|---|
| Log | 해당 string 을 콘솔창에 표시합니다. |
| LogAssert | |
| AddCommand | 만들어진 명령 계층에 delegate 를 선언합니다. |
| CreateCommand | 새로 명령 계층을 구성하여 delegate 를 선언합니다. |
| Name | Description |
|---|---|
| Initialized | 이 매니저가 생성되고, 초기화되었는지 반환합니다. |
| Instance | 싱글톤입니다. |
| MainThread | 유니티 메인 스레드를 반환합니다. |
| BackgroundThread | 백그라운드 스레드를 반환합니다. |
| Name | Description |
|---|---|
| System | CoreSystem 의 인스턴스 객체를 반환합니다. |
| Name | Description |
|---|---|
| DisplayName | Hierarchy에서 표기될 이름을 설정합니다. 빌드에서는 아무런 기능을 하지 않습니다. |
| DontDestroy | 씬이 전환되어도 파괴되지 않을 것인지를 설정합니다. |
| HideInHierarchy | Hierarchy에 표시될지를 설정합니다. 빌드에서는 아무런 기능을 하지 않습니다. |
| ManualInitialize | 사용자에 의해 수동으로 초기화 할지를 설정합니다. StaticManager를 상속받고 있으면 값은 무조건 false이며 override 될 수 없습니다. |
| Flag | 현재 시스템의 종류입니다. |
| Name | Description |
|---|---|
| IsMainthread | 이 메소드가 실행된 스레드가 유니티 메인스레드인지 반환합니다. |
| Name | Description |
|---|---|
| ThreadAwaiter | 해당 시간만큼 스레드를 sleep 합니다. |
| AwaitForNotNull |
| Name | Description |
|---|---|
| OnInitialize | 초기화 될 때 실행될 함수입니다. |
| OnStart | 초기화가 다 끝나고 실행될 함수입니다. |
| Initialize | 초기화 함수입니다. |
| StartUnityUpdate | 입력한 iterator를 유니티 메인 스레드에서 iteration 합니다. |
| StartBackgroundUpdate | 입력한 iterator를 백그라운드 스레드에서 iteration 합니다. |
| StopUnityUpdate | 입력한 CoreRoutine을 정지합니다. |
| StopBackgroundUpdate | 입력한 CoreRoutine을 정지합니다. |
- Interfaces
- Enums
- SystemFlag
- CoreSystemExceptionFlag
- UserTagFlag
- CustomTagFlag
- ObValueDetection
- ConsoleFlag
- CommandSetting
- Attributes
- Abstract Classes
- Classes
- CoreSystem
- CoreSystemSettings
- PrefabManager
- PrefabList
- RenderManager
- RenderController
-
ConsoleWindow
- CommandDefinition
- CommandField
- CommandRequires
- FMODSystem
- UserTagNameModule
- CustomTagNameModule
- Timer
- BackgroundJob
- ForegroundJob
- WaitForBackgroundJob
- WaitForBackgroundJobWorker
- WaitForForegroundJob
- WaitForTimer
- BackgroundJobWorker
- ObArray
- ObClass
- ObDictionary
- ObList
- ObQueue
- ObValue
- ExtensionMethods
- ThreadSafe
- Structs
- CoreRoutine
- SQLiteDatabase
- SQLiteTable
- SQLiteColumn
- SQLiteVersionInfoTableData
- Bound
- Pole
- Vector2
- Vector3
- Exceptions
- Syadeu.Presentation
- PresentationManager
- SceneList
- EntityDataList
- CustomLoadingScene
- DefaultPresentationGroup
- PresentationGroupEntity
- IPresentationSystemGroup
- PresentationSystemGroup<T>
- PresentationSystem<T>
- PresentationSystem<TGroup, TSystem>
- PresentationSystemEntity<T>
- PresentationSystemModule<TSystem>
- PresentationSystemID
- INotifySystemModule<TModule>
- IExecutable<T>
- PresentationLoop
- PresentationResult
- IReference
- Reference
- SubSystemAttribute
- LoadingSceneSetupEntity
- SceneReference
- SceneSystem
- EntitySystem
- EntityBoundSystem
- EntityRaycastSystem
- EntityExtensionMethods
- AttributeAcceptOnlyAttribute
- EntityAcceptOnlyAttribute
- CoroutineSystem
- CoroutineJob
- ICoroutineJob
- UpdateLoop
- RaycastInfo
- ObjectBase
- ProcessorBase
- WaitForPresentationSystem<T>
- WaitForProxy<T>
- Syadeu.Collections
- AABB
- Plane
- PropertyBlockBase
- PropertyBlock<T>
- ActionWrapper
- BinaryGrid
- CLRContainer
- CLRSingleTone
- CLSTypedDictionary<TValue>
- CLSTypedDictionary<TKey, TValue>
- Direction
- EntityID
- EntityShortID
- IEntityDataID
- IInstance
- IInstance<T>
- Instance
- Instance<T>
- InstanceID
- FixedInstanceList16<T>
- FixedInstanceList64<T>
- IFixedReference
- IFixedReference<T>
- FixedReference
- FixedReference<T>
- FixedReferenceList16<T>
- FixedReferenceList64<T>
- IFixedReferenceList<T>
- FixedListExtensionMethods
- IEntity
- IEntityData
- IAttribute
- IObject
- IEntityComponent
- IPrefabReference
- IPrefabResource
- IEmpty
- IValidation
- FNV1a32
- FNV1a64
- Hash
- 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