Exemplo n.º 1
0
 protected override void OnSelect()
 {
     base.OnSelect();
     if (track.clips != null)
     {
         Selection.activeGameObject = null;
         foreach (var clip in track.clips)
         {
             XSceneFxClip fxClip = clip as XSceneFxClip;
             if (fxClip)
             {
                 Selection.Add(fxClip.prefabGameObject);
             }
         }
     }
 }
Exemplo n.º 2
0
        protected override void OnInspectorClip(IClip c)
        {
            base.OnInspectorClip(c);
            XSceneFxClip clip = (XSceneFxClip)c;
            var          data = clip.data as SceneFxClipData;

            if (clip)
            {
                EditorGUILayout.LabelField(clip.prefabGameObject.name);
                EditorGUILayout.ObjectField("fx", clip.prefabGameObject, typeof(GameObject), true);
                var go = clip.prefabGameObject;
                if (go)
                {
                    var tf = go.transform;
                    tf.localPosition    = EditorGUILayout.Vector3Field("pos", tf.localPosition);
                    tf.localEulerAngles = EditorGUILayout.Vector3Field("rot", tf.localEulerAngles);
                    tf.localScale       = EditorGUILayout.Vector3Field("scale", tf.localScale);
                    data.pos            = tf.localPosition;
                    data.rot            = tf.localEulerAngles;
                    data.scale          = tf.localScale;
                }
            }
        }