Latest AC. Latest Unity.
This is very odd. On first entry to the scene, the player performs an animation, walks to a marker and speaks dialogue.
On the second time, a variable switches and the player animates and should move to a marker.
However.
On second entry, he runs of to an unmarkered spot miles out of the scene?!?!
I have tried a process of elimination of removing things, and nothing makes any difference.
The only difference in the action list is that a variable records the player has already been in the scene so bypasses the speech. There is only one player start in the scene.
Please see video, and action lists.
https://www.dropbox.com/sh/7oim22lkumu1h8j/AAC78UYiz64WTuyY06ebMG1Ha?dl=0Thanks
James
Comments
Where is your Character: Move to point Action? I don't see it in your OnStart ActionList?
You posted Inspectors of two NavMeshes - what are their shapes?
Open up Char.cs, and find the MoveAlongPoints method (around line 2253). Insert the following at the top of it:
Debug.Log ("Moving " + name + " to " + pointData[pointData.Length-1]);
What's the output of the Console when the player moves off-screen?
The nav meshes are normal ( see screenshot)
Even when I remove the nav mesh from the scene manager, he still runs off.
Ignore my MoveToPoint comment, he should just animate at PlayerStart and stand sill (like on first scene enter)
I don't know where exactly to put one of code - I just got errors (see screenshot)
https://www.dropbox.com/sh/7oim22lkumu1h8j/AAC78UYiz64WTuyY06ebMG1Ha?dl=0
Thanks
James
Console message is:
You can use the Actions Manager to show all instances of an Action type in the scene - it doesn't appear to be coming from an ActionList asset file.
Let's try a new Debug log statement that runs whenever a new ActionList is called - it may help reveal that some unintended list is being run. Inside ActionList.cs, find line 175:
if (actions.Count > 0 && actions.Count > i)
Just above it, insert the following:
Debug.LogWarning ("Running ActionList: " + name);
What ActionList names appear in the Console when you the issue occurs? Anything besides the OnStart?
which is use in all scenes and different times.
OnStart is still in the scene manager, so it should be running? But it didn't show up in the console log like it did on the first time I visited the scene.
I then put the same action lists in to another cutscene and put that as an action list to be run on second visit, but the same thing happened.
Disable Collapse, and clear it before entering the new scene - so that only the relevant lists are shown.
We can use another Debug statement when the Action commands the player, and use it to learn the Marker and scene involved.
In ActionCharPathFind.cs, find line 120:
if (pathFind && KickStarter.navigationManager)
And insert the following above it:
Debug.Log ("Move " + charToMove + " to marker: " + marker + " in scene " + UnityVersionHandler.GetCurrentSceneName ());
What's the new result from the Console?
HOWEVER PROBLEM SOLVED!
For some reason, the player was acting on a marker from the previous scene (Bay), and ace I removed this marker, it solved the problem. The scene Bay was a preload OnStart, so i wonder if this was the issue?
Anyhow, see new screenshot in folder of console showing that was the problerm
Thanks for all the help!