유니티

Unity Fungus

Unity Fungus #3 - 선택지, 메뉴 만들기

Menu Command로 선택지 추가 블럭을 선택하고 Menu Command를 추가합니다. 선택지를 둘 정도 추가하고, Text에 선택지 이름을 적어줍니다. 이 상태로 실행하면 위 영상처럼 실행됩니다. Block 추가, Menu Command와 연결하기 Flowchart Window에서 마우스 우클릭하여 새로운 블럭을 추가합니다. 그리고, 새로 추가한 블럭을 선택합니다. 블럭의 이름을 변경하고 블럭이 실행되었을 때 실행할 Say Command를 추가해줍니다. 위와 비슷하게 선택지에 맞게 블럭을 설정해줍니다. 시작 블럭으로 돌아와 이전에 추가한 Menu Command를 선택하고 [Target Block]을 선택하고 이전에 추가한 닭도리탕 블럭과 봉추찜닭 블럭을 각각 선택해줍니다. 정상적으로 선택되었다면 위..

Unity Fungus

Unity Fungus #1 - Import

Unity: 2022.3.17f1 Fungus: 3.13.8 https://github.com/snozbot/fungus GitHub - snozbot/fungus: An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more. An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more. - GitHub - snozbot/fungus: An easy to use Unity 3D library for creating illustrated Interactive Fiction ... github.com ..

Unity Fungus

Unity Fungus - 비주얼노벨, 미연시, 스토리텔링 게임 개발 에셋

안녕하세요. 최근에 Fungus를 알게된 김에 관련 내용들 정리해봅니다. https://fungusgames.com/ Fungus Fungus brings your game to life by making it easy to add colourful characters and gripping storylines to your Unity 3D game. Its intuitive interface lets you create beautiful story games easily - for free and with no coding! fungusgames.com 공식적으로는 "Unity 3D에서 대화형 스토리텔링 게임을 만들기 위한 오픈 소스 도구" 라고 소개되어있습니다. 비주얼노벨에 필요한 요소들은 대부분 갖..

Unity Tips

NSprites - Unity ECS용 Sprite Renderer, Sprite Animation 프레임워크

안녕하세요. 기존에 ECS 3D기반으로 개발된 프로젝트를 2D 도트느낌의 게임으로 변환하면서 NSprites라는 라이브러리를 사용했는데 관련해서 주의해야 할 점들 정리해밨습니다. 1. NSprites https://github.com/Antoshidza/NSprites GitHub - Antoshidza/NSprites: Unity DOTS Sprite Rendering Package Unity DOTS Sprite Rendering Package. Contribute to Antoshidza/NSprites development by creating an account on GitHub. github.com 이 Framework는 ECS와 호환되는 Sprite Rendering 시스템 입니다. GP..

Unity Tips

Unity Entities - Job에서 EntityManager, EntityCommandBuffer 사용 방법

Unity 2022.3.2f Entities 1.0.11 public void OnUpdate(ref SystemState state) { var ecbSingleton = SystemAPI.GetSingleton(); var ecb = ecbSingleton.CreateCommandBuffer(state.WorldUnmanaged).AsParallelWriter(); new CaracterUpdateJob() { ecb = ecb, deltaTime = SystemAPI.Time.DeltaTime, }.ScheduleParallel(); } EntityManager나 EntityCommandBuffer를 그대로 Job에 넘길 수 없어서 EntityCommandBuffer.ParallelWriter로 바..

Unity Entities Tutorial

Unity Entities 1.0.0 Tutorial - Step 9. Camera follow

런타임에서 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..

Unity Entities Tutorial

Unity Entities 1.0.0 Tutorial - Step 8. Safe zone

Config 싱글톤, 실시간 변환. 1. "Authoring/Components" 폴더에 "Shooting.cs"라는 이름의 새 C# 소스 파일을 만들고 아래 코드를 작성합니다. using Unity.Entities; // 이것은 "Enableable Component"이기도 한 태그 구성 요소입니다. // 이러한 Component는 Entity에 남아 있는 동안 켜고 끌 수 있습니다. // 그렇게 하는 것이 Component를 추가하고 제거하는 것보다 훨씬 효율적입니다. struct Shooting : IComponentData, IEnableableComponent { } 2. "Scripts/Authoring" 폴더에 있는 "TurretAuthoring.cs" 파일의 내용을 아래와 같이 수정합니다...

Unity Entities Tutorial

Unity Entities 1.0.0 Tutorial - Step 7. Colored tanks and cannon balls

고급 베이킹, 베이킹 시스템 도입. ECS Component들은 렌더링에 사용되는 Shader에 대한 입력을 제어할 수 있습니다. Shader Graph를 통해 자체 Shader를 생성하고 사용자 지정 ECS Component를 해당 입력에 매핑하는 것은 이 Tutorial의 범위를 벗어나지만 URPMaterialPropertyBaseColor라는 Component를 사용합니다. 이름에서 알 수 있듯이 Standard URP Material의 기본 색상을 제어할 수 있습니다. 우리의 탱크는 3개의 요소(탱크, 포탑, 대포)로 구성되며 각 Entity에는 URPMaterialPropertyBaseColor Component가 추가되어야 합니다. 이렇게 하려면 탱크 프리팹을 열고 계층 구조에서 세 가지 요소..

Unity Entities Tutorial

Unity Entities 1.0.0 Tutorial - Step 6. Spawning many tanks

한 번만 실행해야 하는 초기화 시스템 처리. 1. "EntityScene"에서 "Tank" GameObject를 프로젝트 창의 "Assets/Prefabs" 폴더로 드래그 앤 드롭 합니다. 2. "EntityScene"에서 "Tank" GameObject(현재 Prefab Instance)를 삭제합니다. 3. "Scripts/Authoring" 폴더에 "ConfigAuthoring.cs"라는 새 C# 소스 파일을 만들고 아래 내용을 추가합니다. using Unity.Entities; class ConfigAuthoring : UnityEngine.MonoBehaviour { public UnityEngine.GameObject TankPrefab; public int TankCount; public fl..

Unity Entities Tutorial

Unity Entities 1.0.0 Tutorial - Step 5. Cannon ball movement

parallel job을 소개합니다. 1. "Scripts/Aspects" 폴더에 "CannonBallAspect.cs"라는 이름의 새 C# 소스 파일을 만들고 아래 코드를 작성합니다. using Unity.Entities; using Unity.Mathematics; using Unity.Transforms; readonly partial struct CannonBallAspect : IAspect { // 관점의 엔티티 필드는 엔티티 자체에 대한 액세스를 제공합니다. // 예를 들어 EntityCommandBuffer에 명령을 등록하는 데 필요합니다. public readonly Entity Self; // Aspect에는 다른 Aspect가 포함될 수 있습니다. readonly TransformAs..