ObjectField() 공개 정적인 메소드

public static ObjectField ( string label, Object obj, Type objType, bool allowSceneObjects ) : Object
label string
obj Object
objType System.Type
allowSceneObjects bool
리턴 Object
예제 #1
0
        private void ShowFace(string label, CubemapFace face)
        {
            Cubemap cubemapRef = base.target as Cubemap;

            GUI.changed = false;
            Texture2D texture2D = (Texture2D)CubemapInspector.ObjectField(label, this.m_Images[(int)face], typeof(Texture2D), false, new GUILayoutOption[0]);

            if (GUI.changed)
            {
                TextureUtil.CopyTextureIntoCubemapFace(texture2D, cubemapRef, face);
                this.m_Images[(int)face] = texture2D;
            }
        }
예제 #2
0
        private void ShowFace(string label, CubemapFace face)
        {
            Cubemap target = this.target as Cubemap;
            int     index  = (int)face;

            GUI.changed = false;
            Texture2D textureRef = (Texture2D)CubemapInspector.ObjectField(label, (UnityEngine.Object) this.m_Images[index], typeof(Texture2D), false);

            if (!GUI.changed)
            {
                return;
            }
            TextureUtil.CopyTextureIntoCubemapFace(textureRef, target, face);
            this.m_Images[index] = textureRef;
        }