런타임에서 ECS와 GameObject 간의 간단한 상호 작용. 1. "Scripts/MonoBehaviours" 폴더에 "CameraSingleton.cs"라는 이름의 새 C# 소스 파일을 만들고 아래 코드를 작성합니다. // main cmaera에 접근하는 방법은 여러 가지가 있지만 싱글톤(여기서 사용하는 대로)을 사용하는 접근 방식은 모든 종류의 MonoBehaviour에서 작동합니다. class CameraSingleton : UnityEngine.MonoBehaviour { public static UnityEngine.Camera Instance; void Awake() { Instance = GetComponent(); } } 2. "SampleScene"의 "Main Camera" Game..
Config 싱글톤, 실시간 변환. 1. "Authoring/Components" 폴더에 "Shooting.cs"라는 이름의 새 C# 소스 파일을 만들고 아래 코드를 작성합니다. using Unity.Entities; // 이것은 "Enableable Component"이기도 한 태그 구성 요소입니다. // 이러한 Component는 Entity에 남아 있는 동안 켜고 끌 수 있습니다. // 그렇게 하는 것이 Component를 추가하고 제거하는 것보다 훨씬 효율적입니다. struct Shooting : IComponentData, IEnableableComponent { } 2. "Scripts/Authoring" 폴더에 있는 "TurretAuthoring.cs" 파일의 내용을 아래와 같이 수정합니다...
1. Unity.Physics 추가 https://docs.unity3d.com/Packages/com.unity.physics@1.0/manual/index.html Unity Physics overview | Unity Physics | 1.0.0-pre.15 Unity Physics overview The Unity Physics package, part of Unity's Data-Oriented Technology Stack (DOTS), provides a deterministic rigid body dynamics system and spatial query system. See the Unity Physics Samples for introductory material, including ..