private void DefaultEditProtoType()
{
bool prevProtoTypeType = m_detailContainer.usePrototypeMesh;
m_detailContainer.usePrototypeMesh = DrawSwitch(prevProtoTypeType, "texture", "mesh");
if (m_detailContainer.usePrototypeMesh)
{
if (!prevProtoTypeType)
{ // Reset Mesh to null
m_detailContainer.prototype = null;
m_detailContainer.renderMode = DetailRenderMode.VertexLit;
}
m_detailContainer.prototype = EditorGUILayout.ObjectField("GameObject", m_detailContainer.prototype, typeof(GameObject), false) as GameObject;
}
else
{
if (prevProtoTypeType)
{ // Reset Texture to null
m_detailContainer.prototypeTexture = null;
m_detailContainer.renderMode = DetailRenderMode.Grass;
}
m_detailContainer.prototypeTexture = EditorGUILayout.ObjectField("Texture", m_detailContainer.prototypeTexture, typeof(Texture2D), false) as Texture2D;
m_detailContainer.renderMode = EditorGUILayout.Toggle(new GUIContent("Billboard", "Draw texture as billboard"), m_detailContainer.renderMode == DetailRenderMode.GrassBillboard) ? DetailRenderMode.GrassBillboard : DetailRenderMode.Grass;
}
m_detailContainer.bendFactor = EditorGUILayout.FloatField(new GUIContent("Bend Factor"), m_detailContainer.bendFactor);
m_detailContainer.noiseSpread = EditorGUILayout.FloatField(new GUIContent("Noise Spread", "Variation of dry and healty details"), m_detailContainer.noiseSpread);
m_detailContainer.minWidth = EditorGUILayout.FloatField(new GUIContent("Min Width", "Min detail width"), m_detailContainer.minWidth);
m_detailContainer.maxWidth = EditorGUILayout.FloatField(new GUIContent("Max Width", "Max detail width"), m_detailContainer.maxWidth);
m_detailContainer.minHeight = EditorGUILayout.FloatField(new GUIContent("Min Heigth", "Min detail height"), m_detailContainer.minHeight);
m_detailContainer.maxHeight = EditorGUILayout.FloatField(new GUIContent("Max Height", "Max detail height"), m_detailContainer.maxHeight);
m_detailContainer.healthyColor = EditorGUILayout.ColorField(new GUIContent("Healthy Color"), m_detailContainer.healthyColor);
m_detailContainer.dryColor = EditorGUILayout.ColorField(new GUIContent("Dry Color"), m_detailContainer.dryColor);
}
private static DetailPrototype DefaultPrototype