Unity custom PlayableAsset displayed in the Inspector

    Project uses a large number of PlayableBehaviour, and PlayableBehaviour the parameter is passed by the PlayableAsset go in, because the parameters is more complex at the same time so take some control options to customize the display in the Inspector.

In fact, the general methods and other types of customized methods same.

 

using UnityEngine;
using UnityEditor;

public class A : PlayableAsset
{
}

[CustomEditor(typeof(A))]
public class Test : Editor
{
        A m_Target;
    
       void OnEnable()
       {
              m_Target = (A)target;
        }        

       public override void OnInspector()
       {
    
            // EditorGUILayout.FloatLable();
       }
}             

 

Guess you like

Origin www.cnblogs.com/liucUP/p/11329045.html