public void OnEnable()
{
disableBehaviour = new SerializedObject(this.target);
this.fireTime = disableBehaviour.FindProperty("firetime");
this.componentsProperty = disableBehaviour.FindProperty("Behaviour");
this.editorRevert = disableBehaviour.FindProperty("editorRevertMode");
this.runtimeRevert = disableBehaviour.FindProperty("runtimeRevertMode");
Component currentComponent = componentsProperty.objectReferenceValue as Component;
DisableBehaviour behaviour = (target as DisableBehaviour);
if (behaviour == null || behaviour.ActorTrackGroup == null || behaviour.ActorTrackGroup.Actor == null)
{
return;
}
GameObject actor = behaviour.ActorTrackGroup.Actor.gameObject;
Component[] behaviours = DirectorHelper.getEnableableComponents(actor);
for (int j = 0; j < behaviours.Length; j++)
{
if (behaviours[j] == currentComponent)
{
componentSelection = j;
}
}
}