当前位置: 首页>>代码示例>>C#>>正文


C# ProceduralMaterial.GetGeneratedTextures方法代码示例

本文整理汇总了C#中UnityEngine.ProceduralMaterial.GetGeneratedTextures方法的典型用法代码示例。如果您正苦于以下问题:C# ProceduralMaterial.GetGeneratedTextures方法的具体用法?C# ProceduralMaterial.GetGeneratedTextures怎么用?C# ProceduralMaterial.GetGeneratedTextures使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UnityEngine.ProceduralMaterial的用法示例。


在下文中一共展示了ProceduralMaterial.GetGeneratedTextures方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowGeneratedTexturesGUI

 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();
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:29,代码来源:ProceduralMaterialInspector.cs

示例2: ShowGeneratedTexturesGUI

 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();
     }
 }
开发者ID:CarlosHBC,项目名称:UnityDecompiled,代码行数:33,代码来源:ProceduralMaterialInspector.cs

示例3: ShowGeneratedTexturesGUI

		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();
		}
开发者ID:guozanhua,项目名称:UnityDecompiled,代码行数:42,代码来源:ProceduralMaterialInspector.cs


注:本文中的UnityEngine.ProceduralMaterial.GetGeneratedTextures方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。