Generic Background Camera Position
Смена позиций камеры у Generic Background-
На камеру префаба generic фона повесил тег "MapCamera"
-
Файл /NaniMy/MyCam.cs:
using Naninovel; using Naninovel.Commands; using System.Threading; using UnityEngine; namespace MyCam { [CommandAlias("MoveCam")] public class MoveCam : Command { public DecimalListParameter position; public override async UniTask ExecuteAsync(AsyncToken asyncToken = default) { GameObject mycamera = GameObject.FindGameObjectWithTag("MapCamera"); mycamera.transform.position = new Vector3(position[0], position[1], position[2] + 100f); } } }
-
Файл /Scripts/test.nani:
@MoveCam MyCamPosition:10,0,30