Exemple #1
0
    public override void OnInspectorGUI()
    {
        SEUDebugObject debugObject = target as SEUDebugObject;

        if (debugObject == null || debugObject.resource == null)
        {
            return;
        }
        EditorGUILayout.BeginVertical(EditorStyles.helpBox);


        var oc = GUI.color;

        GUI.color = Color.yellow;
        EditorGUILayout.LabelField("SEUResources [" + debugObject.resource.GetType() + "]", EditorStyles.boldLabel);
        GUI.color = oc;
        EditorGUILayout.BeginVertical(EditorStyles.helpBox);
        DrawSEUResources(debugObject.resource);
        EditorGUILayout.EndVertical();
        GUILayout.Space(10);

        EditorGUILayout.LabelField("Dependence", EditorStyles.boldLabel);
        EditorGUILayout.BeginVertical(EditorStyles.helpBox);

        for (int i = 0; i < debugObject.resource.dependenceResources.Count; i++)
        {
            DrawSEUResources(debugObject.resource.dependenceResources[i], true);
        }
        EditorGUILayout.EndVertical();
        EditorGUILayout.EndVertical();
    }
    public void DebugCreateObject()
    {
        DebugObject = new GameObject(m_LoadPath);
        SEUDebugObject debugObject = DebugObject.AddComponent <SEUDebugObject>();

        debugObject.resource = this;
    }