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; } }
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; }