Beispiel #1
0
        protected override void InitilizeRootEditorGUIElement(EditorGUIElement_Container_Auto root, EditTarget target)
        {
            root.AddChild(new EditorGUIElement_Complex_EditTarget(target));

            SpriteVectorizer sprite_vectorizer;

            if (target.TryGetObject <SpriteVectorizer>(out sprite_vectorizer))
            {
                root.AddChild(new EditorGUIElement_SpriteVectorizerTest(sprite_vectorizer));
            }
        }
Beispiel #2
0
        static public bool TryGetObject <T>(this EditTarget item, out T obj, bool allow_null_object = false)
        {
            object temp;

            if (item.TryGetObject(out temp))
            {
                if (temp.Convert <T>(out obj, allow_null_object))
                {
                    return(true);
                }
            }

            obj = default(T);
            return(false);
        }