本文整理汇总了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();
}
示例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();
}
}
示例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();
}