本文整理汇总了C#中Planet.LoadModule方法的典型用法代码示例。如果您正苦于以下问题:C# Planet.LoadModule方法的具体用法?C# Planet.LoadModule怎么用?C# Planet.LoadModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Planet
的用法示例。
在下文中一共展示了Planet.LoadModule方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnEnable
//SerializedProperty generateColliders;
void OnEnable()
{
// the planet being edited
planet = (Planet)target;
if(planet.Terrain == null)
planet.LoadModule();
terrainAsset = serializedObject.FindProperty("terrainAsset");
frequencyScale = serializedObject.FindProperty("frequencyScale");
radius = serializedObject.FindProperty("radius");
heightVariation = serializedObject.FindProperty("heightVariation");
meshResolution = serializedObject.FindProperty("meshResolution");
subdivisions = serializedObject.FindProperty("subdivisions");
createBorders = serializedObject.FindProperty("createBorders");
logGenerationTimes = serializedObject.FindProperty("logGenerationTimes");
showDebug = serializedObject.FindProperty("showDebugInfo");
generateOnStart = serializedObject.FindProperty("generateOnStart");
randomizeSeeds = serializedObject.FindProperty("randomizeSeeds");
seed = serializedObject.FindProperty("seed");
//useLod = serializedObject.FindProperty("useLod");
//maxLodLevel = serializedObject.FindProperty("maxLodLevel");
//lodDistances = serializedObject.FindProperty("lodDistances");
lodTarget = serializedObject.FindProperty("lodTarget");
simultaneousSubdivisions = serializedObject.FindProperty("simultaneousSubdivisions");
useAngleCulling = serializedObject.FindProperty("useAngleCulling");
rendererCullingAngle = serializedObject.FindProperty("rendererCullingAngle");
lodUpdateInterval = serializedObject.FindProperty("lodUpdateInterval");
//generateColliders = serializedObject.FindProperty("generateColliders");
// hide wireframes
Renderer[] renderers = planet.gameObject.GetComponentsInChildren<Renderer>();
for(int i = 0; i < renderers.Length; i++){
EditorUtility.SetSelectedWireframeHidden(renderers[i], true);
}
}