Page 1 of 2
x2 stateBehavior scripts on a gameObject
Posted: 2017/07/11 20:52
by IgorAherne
Hello,
Usually, "stateBehaviors" are hidden away, and are not seen in "Inspector" of a gameObject.
But, now I can see the scripts!
- Using Unity3D 5.6.2
Using Unity Collab
There are no errors in console right now
Also, why is there two same scripts attached to my gameObject?
I have "Abilities FSM" (doesn't have these scripts) and "Nav FSM" (has these scripts, on states).
Can I delete the duplicates? Or are they used?
Here is a screenshot of the "Nav FSM":
https://gyazo.com/319b6a6d61e1a36a4db2ef65ccb2a3c5
Thank you!
Igor
Re: x2 stateBehavior scripts on a gameObject
Posted: 2017/07/11 21:28
by IgorAherne
Addition:
I removed all visible behaviors and FSM still works (it's nodes still show StateBehaviors)
Just curious why it creates extra component copies. Maybe it will create a component-clone and I will never know, because it's hidden form "Inspector"? So I would have a not-used Monobehavior hidden on my GameObject (resulting in pollution)
Thanks!
Igor
Re: x2 stateBehavior scripts on a gameObject
Posted: 2017/07/11 22:51
by caitsithware
I will investigate.
Do you remember what you did last minute?
For example, did you Apply that prefab?
Re: x2 stateBehavior scripts on a gameObject
Posted: 2017/07/14 20:55
by Igor
Currently, just notice them after starting Unity
They don't always appear, - I think it occurs when I set-up "States" and "StateBehaviors", 'save' and come back to Unity next day
Re: x2 stateBehavior scripts on a gameObject
Posted: 2017/07/14 20:57
by Igor
They never show in inspector when looking at a prefab.
But they appear on an instance, after I drag-drop prefab into scene
Re: x2 stateBehavior scripts on a gameObject
Posted: 2017/07/14 20:58
by Igor
Even if I remove them (they are disabled components) and apply to prefab, - if I instantiate prefab in scene, they show up
Re: x2 stateBehavior scripts on a gameObject
Posted: 2017/07/14 21:04
by Igor
I have two FSM machines on the gameObject, but with different names
Re: x2 stateBehavior scripts on a gameObject
Posted: 2017/07/14 21:06
by Igor
Re: x2 stateBehavior scripts on a gameObject
Posted: 2017/07/15 01:05
by caitsithware
I can't reproduce it, but maybe the reference of StateMachine is broken.
I temporarily created a repair script.
The export environment of this unitypackage:
- Unity 5.6.2f1
- Arbor 2.1.4
After import this unitypackage, select the prefab that might be broken, please run a menu of Tools > Arbor > Repair.
If the reference is broken, the following warning message is output to the Console.
(If reference is normal, no warning is output and only Cheking message is output)
- ArborRepairLog.png (35.41 KiB) Viewed 11158 times
If it is repaired (warning message was output) try again instantiating prefab.
Re: x2 stateBehavior scripts on a gameObject
Posted: 2017/07/15 17:53
by igor
Selecting prefab, using the Repair tool produces this:
Code: Select all
ArborRepair : Checking invalid zombie_common_abilTesting_Blen (2) (ArborFSM_namespace.ArborFSM) "Abilities FSM" StateMachine reference
ArborRepair : Checking invalid zombie_common_abilTesting_Blen (2) (ArborFSM_namespace.ArborFSM) "Nav FSM" StateMachine reference.
No errors or warnings are outputted.
Instantiating prefab in scene produces the same problem :/
Selecting instance, using the Repair tool produces same messages (no warnings or errors)
If I move the instance in scene, then click ctrl+z, this brings it to original position and scripts don't show up on the instance anymore (they hide away)