Setting Actor Field Bit Weird
Posted: Sun Jan 10, 2021 6:50 am
Hi Tony,
Just have an issue regarding some additional functionality I have been trying to program:
I'm currently working on an NPC spawner that will spawn some people around points of interest and have them say some appropriate lines. To do so, I've updated the NPC template to remove the Locations field and replaced it with a text Location like so:
In the spawner, I set the location field like this:
The Debug.Log gives me
The gameObjects are all named the same as their Actors in the database. I tried setting a watch for the Actor variables but I couldn't find an option to do so. Using the Info Debug level also doesn't really give me an answer. Any ideas?
Just have an issue regarding some additional functionality I have been trying to program:
I'm currently working on an NPC spawner that will spawn some people around points of interest and have them say some appropriate lines. To do so, I've updated the NPC template to remove the Locations field and replaced it with a text Location like so:
In the spawner, I set the location field like this:
Code: Select all
GameObject researcherObject = GameObject.Instantiate(researchers[spawner], transform.position, transform.rotation);
DialogueLua.SetActorField(researcherObject.name, "Location", locationType);
Debug.Log(DialogueLua.GetActorField(researcherObject.name, "Location"));
}
}
Code: Select all
PixelCrushers.DialogueSystem.Lua+Result
UnityEngine.Debug:Log (object)
ResearcherSpawner:Start () (at Assets/Scripts/NPCs/Dialogue/ResearcherSpawner.cs:46)