Hello,
When the player prefab is selected from its "Resources" folder, and then you click play in the Editor a few things happen:
1. The camera cannot find the player anylonger, because the player does not exist (looks like it does not spawn)
2. Console log errors:
- !CompareApproximately (aScalar, 0.0F)
UnityEngine.Quaternion:Lerp(Quaternion, Quaternion, Single)
AC.GameCameraThirdPerson:UpdateSelf() (at Assets/AdventureCreator/Scripts/Camera/GameCameraThirdPerson.cs:199)
AC.GameCameraThirdPerson:_Update() (at Assets/AdventureCreator/Scripts/Camera/GameCameraThirdPerson.cs:183)
AC.StateHandler:Update() (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:344)
- transform.rotation assign attempt for 'TopDownPlayerCamera' is not valid. Input rotation is { NaN, NaN, NaN, NaN }.
UnityEngine.Transform:set_rotation(Quaternion)
AC.GameCameraThirdPerson:UpdateSelf() (at Assets/AdventureCreator/Scripts/Camera/GameCameraThirdPerson.cs:199)
AC.GameCameraThirdPerson:_Update() (at Assets/AdventureCreator/Scripts/Camera/GameCameraThirdPerson.cs:183)
AC.StateHandler:Update() (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:344)
Why does this happen? Is it a Untiy bug or?
NOTE: "Player" Prefab has FSM objects (PlayMaker)
Thank you.
V 1.50i
Comments
Insert the following line into line 122 (just below "base.Awake ();":
targetRotation = transform.rotation;
Does that remove the error?
As you've stated you cannot re create this on your end, therefore it must be from another asset.
I also have hierarchy2 which might be the reason. - I will test this in the future.
Anyhow, since this is not caused by AC I will just simply have to de-select the prefab prior to playing.
Thanks appreciate the support.
Instead I get the message of the possibly unity hidden bug
Player clone found in scene – this may have been hidden by a Unity bug, and has been destroyed.
—————————–
UnityEngine.Debug:LogWarning(Object, Object)
AC.ACDebug:LogWarning(Object, Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:26)
AC.KickStarter:OnAwake() (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:871)
AC.MultiSceneChecker:Awake() (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:30)