GetGeneratedTextures() приватный Метод

private GetGeneratedTextures ( ) : UnityEngine.Texture[]
Результат UnityEngine.Texture[]
 static public int GetGeneratedTextures(IntPtr l)
 {
     try {
         UnityEngine.ProceduralMaterial self = (UnityEngine.ProceduralMaterial)checkSelf(l);
         var ret = self.GetGeneratedTextures();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #2
0
 static public int GetGeneratedTextures(IntPtr l)
 {
     try {
         UnityEngine.ProceduralMaterial self = (UnityEngine.ProceduralMaterial)checkSelf(l);
         var ret = self.GetGeneratedTextures();
         pushValue(l, ret);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 protected void ShowGeneratedTexturesGUI(ProceduralMaterial material)
 {
   if (this.targets.Length > 1 || (UnityEngine.Object) ProceduralMaterialInspector.m_Importer != (UnityEngine.Object) null && !ProceduralMaterialInspector.m_Importer.GetGenerateAllOutputs(ProceduralMaterialInspector.m_Material))
     return;
   GUIStyle guiStyle = (GUIStyle) "ObjectPickerResultsGridLabel";
   EditorGUILayout.Space();
   GUILayout.FlexibleSpace();
   this.m_ScrollPos = EditorGUILayout.BeginScrollView(this.m_ScrollPos, GUILayout.Height((float) (64.0 + (double) guiStyle.fixedHeight + (double) guiStyle.fixedHeight + 16.0)));
   EditorGUILayout.BeginHorizontal();
   GUILayout.FlexibleSpace();
   float pixels = 10f;
   foreach (Texture generatedTexture in material.GetGeneratedTextures())
   {
     ProceduralTexture tex = generatedTexture as ProceduralTexture;
     if ((UnityEngine.Object) tex != (UnityEngine.Object) null)
     {
       GUILayout.Space(pixels);
       GUILayout.BeginVertical(GUILayout.Height((float) (64.0 + (double) guiStyle.fixedHeight + 8.0)));
       Rect rect = GUILayoutUtility.GetRect(64f, 64f);
       ProceduralMaterialInspector.DoObjectPingField(rect, rect, GUIUtility.GetControlID(12354, EditorGUIUtility.native, rect), (UnityEngine.Object) tex, typeof (Texture));
       this.ShowAlphaSourceGUI(material, tex, ref rect);
       GUILayout.EndVertical();
       GUILayout.Space(pixels);
       GUILayout.FlexibleSpace();
     }
   }
   EditorGUILayout.EndHorizontal();
   EditorGUILayout.EndScrollView();
 }
 protected void ShowGeneratedTexturesGUI(ProceduralMaterial material)
 {
     if ((base.targets.Length <= 1) && ((m_Importer == null) || m_Importer.GetGenerateAllOutputs(m_Material)))
     {
         GUIStyle style = "ObjectPickerResultsGridLabel";
         EditorGUILayout.Space();
         GUILayout.FlexibleSpace();
         GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Height(((64f + style.fixedHeight) + style.fixedHeight) + 16f) };
         this.m_ScrollPos = EditorGUILayout.BeginScrollView(this.m_ScrollPos, options);
         EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
         GUILayout.FlexibleSpace();
         float pixels = 10f;
         Texture[] generatedTextures = material.GetGeneratedTextures();
         foreach (Texture texture in generatedTextures)
         {
             ProceduralTexture texture2 = texture as ProceduralTexture;
             if (texture2 != null)
             {
                 GUILayout.Space(pixels);
                 GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.Height((64f + style.fixedHeight) + 8f) };
                 GUILayout.BeginVertical(optionArray2);
                 Rect position = GUILayoutUtility.GetRect((float) 64f, (float) 64f);
                 DoObjectPingField(position, position, GUIUtility.GetControlID(0x3042, FocusType.Keyboard, position), texture2, typeof(Texture));
                 this.ShowAlphaSourceGUI(material, texture2, ref position);
                 GUILayout.EndVertical();
                 GUILayout.Space(pixels);
                 GUILayout.FlexibleSpace();
             }
         }
         EditorGUILayout.EndHorizontal();
         EditorGUILayout.EndScrollView();
     }
 }
		protected void ShowGeneratedTexturesGUI(ProceduralMaterial material)
		{
			if (base.targets.Length > 1)
			{
				return;
			}
			if (ProceduralMaterialInspector.m_Importer != null && !ProceduralMaterialInspector.m_Importer.GetGenerateAllOutputs(ProceduralMaterialInspector.m_Material))
			{
				return;
			}
			GUIStyle gUIStyle = "ObjectPickerResultsGridLabel";
			EditorGUILayout.Space();
			GUILayout.FlexibleSpace();
			this.m_ScrollPos = EditorGUILayout.BeginScrollView(this.m_ScrollPos, new GUILayoutOption[]
			{
				GUILayout.Height(64f + gUIStyle.fixedHeight + gUIStyle.fixedHeight + 16f)
			});
			EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
			GUILayout.FlexibleSpace();
			float pixels = 10f;
			Texture[] generatedTextures = material.GetGeneratedTextures();
			for (int i = 0; i < generatedTextures.Length; i++)
			{
				ProceduralTexture proceduralTexture = generatedTextures[i] as ProceduralTexture;
				if (proceduralTexture != null)
				{
					GUILayout.Space(pixels);
					GUILayout.BeginVertical(new GUILayoutOption[]
					{
						GUILayout.Height(64f + gUIStyle.fixedHeight + 8f)
					});
					Rect rect = GUILayoutUtility.GetRect(64f, 64f);
					ProceduralMaterialInspector.DoObjectPingField(rect, rect, GUIUtility.GetControlID(12354, EditorGUIUtility.native, rect), proceduralTexture, typeof(Texture));
					this.ShowAlphaSourceGUI(material, proceduralTexture, ref rect);
					GUILayout.EndVertical();
					GUILayout.Space(pixels);
					GUILayout.FlexibleSpace();
				}
			}
			EditorGUILayout.EndHorizontal();
			EditorGUILayout.EndScrollView();
		}