C# Класс ProceduralGeneration, ThreeDWorld

Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
DEBUG_testCubePrefab GameObject
DEBUG_testGridPrefab UnityEngine.TextMesh
DOOR_HEIGHT float
DOOR_WIDTH float
MAX_NUM_TWISTS int
MIN_HALLWAY_SPACING float
NUM_ROOMS int
WALL_TRIM_HEIGHT float
WALL_TRIM_THICKNESS float
WALL_WIDTH float
WINDOW_PLACEMENT_HEIGHT float
WINDOW_SIZE_HEIGHT float
WINDOW_SIZE_WIDTH float
WINDOW_SPACING float
_allHeightPlanes List
_rand System.Random
availablePrefabs List
cache_folder string
ceilingMaterial Material
ceilingPrefab SemanticObjectSimple,
complexityLevelToCreate int
desiredRndSeed int
disable_rand_stacking int
disabledItems List
enable_global_unit_scale int
floorMaterial Material
floorPrefab SemanticObjectSimple,
forceStackedItems int
gridDim float
intensityCeilingLights float
list_rands List
maxPlacementAttempts int
minStackingBases int
numCeilingLights int
permittedItems List
randomMaterials bool
roomDim Vector3
scaleRelatDict LitJson.JsonData
scene_scale_con string
scene_scale_mean float
scene_scale_seed int
scene_scale_var float
shouldUseGivenSeed bool
shouldUseStandardizedSize bool
showProcGenDebug bool
skyboxMaterial Material
standardizedSize Vector3
useStandardShader bool
use_cache_self int
use_mongodb_inter int
wallMaterials List
wallTrimMaterial Material
windowMaterial Material
windowTrimMaterial Material

Открытые методы

Метод Описание
CreateLightingSetup ( Vector3 roomDimensions, Vector3 roomCenter ) : void
CreateRoom ( Vector3 roomDimensions, Vector3 roomCenter ) : void
Init ( ) : void
IsDone ( ) : bool
SavePrefabInformation ( GeneratablePrefab, prefab, bool shouldRecomputePrefabInformation, bool replaceOld = true ) : void
SetupPrefabs ( bool shouldRecompute ) : void
SubdivideRoom ( ) : void
gen_rand_forinfo ( PrefabDatabase, &info ) : void
getNewUIDColor ( ) : Color
resetUIDColor ( ) : void

Приватные методы

Метод Описание
AddObjects ( List prefabList ) : bool
Awake ( ) : void
CompileListOfProceduralComponents ( bool shouldRecomputePrefabInformation ) : void
DrawTestGrid ( HeightPlane, plane ) : void
MakeSimplePrefabObj ( GameObject obj, string subPath ) : void
Start ( ) : void
TryPlaceGroundObject ( Bounds bounds, float modScale, GeneratablePrefab, anchorType, int &finalX, int &finalY, HeightPlane, &whichPlane ) : bool

Tries to place object on the ground.

TryPlaceGroundObject ( Bounds bounds, float modScale, GeneratablePrefab, anchorType, int &finalX, int &finalY, HeightPlane, &whichPlane, float &offset_height ) : bool

Tries to place object on the ground.

Описание методов

CreateLightingSetup() публичный Метод

public CreateLightingSetup ( Vector3 roomDimensions, Vector3 roomCenter ) : void
roomDimensions Vector3
roomCenter Vector3
Результат void

CreateRoom() публичный Метод

public CreateRoom ( Vector3 roomDimensions, Vector3 roomCenter ) : void
roomDimensions Vector3
roomCenter Vector3
Результат void

Init() публичный Метод

public Init ( ) : void
Результат void

IsDone() публичный Метод

public IsDone ( ) : bool
Результат bool

SavePrefabInformation() публичный Метод

public SavePrefabInformation ( GeneratablePrefab, prefab, bool shouldRecomputePrefabInformation, bool replaceOld = true ) : void
prefab GeneratablePrefab,
shouldRecomputePrefabInformation bool
replaceOld bool
Результат void

SetupPrefabs() публичный статический Метод

public static SetupPrefabs ( bool shouldRecompute ) : void
shouldRecompute bool
Результат void

SubdivideRoom() публичный Метод

public SubdivideRoom ( ) : void
Результат void

gen_rand_forinfo() публичный Метод

public gen_rand_forinfo ( PrefabDatabase, &info ) : void
info PrefabDatabase,
Результат void

getNewUIDColor() публичный статический Метод

public static getNewUIDColor ( ) : Color
Результат Color

resetUIDColor() публичный статический Метод

public static resetUIDColor ( ) : void
Результат void

Описание свойств

DEBUG_testCubePrefab публичное свойство

public GameObject DEBUG_testCubePrefab
Результат GameObject

DEBUG_testGridPrefab публичное свойство

public TextMesh,UnityEngine DEBUG_testGridPrefab
Результат UnityEngine.TextMesh

DOOR_HEIGHT публичное свойство

public float DOOR_HEIGHT
Результат float

DOOR_WIDTH публичное свойство

public float DOOR_WIDTH
Результат float

MAX_NUM_TWISTS публичное свойство

public int MAX_NUM_TWISTS
Результат int

MIN_HALLWAY_SPACING публичное свойство

public float MIN_HALLWAY_SPACING
Результат float

NUM_ROOMS публичное свойство

public int NUM_ROOMS
Результат int

WALL_TRIM_HEIGHT публичное свойство

public float WALL_TRIM_HEIGHT
Результат float

WALL_TRIM_THICKNESS публичное свойство

public float WALL_TRIM_THICKNESS
Результат float

WALL_WIDTH публичное свойство

public float WALL_WIDTH
Результат float

WINDOW_PLACEMENT_HEIGHT публичное свойство

public float WINDOW_PLACEMENT_HEIGHT
Результат float

WINDOW_SIZE_HEIGHT публичное свойство

public float WINDOW_SIZE_HEIGHT
Результат float

WINDOW_SIZE_WIDTH публичное свойство

public float WINDOW_SIZE_WIDTH
Результат float

WINDOW_SPACING публичное свойство

public float WINDOW_SPACING
Результат float

_allHeightPlanes публичное свойство

public List _allHeightPlanes
Результат List

_rand публичное свойство

public Random,System _rand
Результат System.Random

availablePrefabs публичное свойство

public List availablePrefabs
Результат List

cache_folder публичное свойство

public string cache_folder
Результат string

ceilingMaterial публичное свойство

public Material ceilingMaterial
Результат Material

ceilingPrefab публичное свойство

public SemanticObjectSimple, ceilingPrefab
Результат SemanticObjectSimple,

complexityLevelToCreate публичное свойство

public int complexityLevelToCreate
Результат int

desiredRndSeed публичное свойство

public int desiredRndSeed
Результат int

disable_rand_stacking публичное свойство

public int disable_rand_stacking
Результат int

disabledItems публичное свойство

public List disabledItems
Результат List

enable_global_unit_scale публичное свойство

public int enable_global_unit_scale
Результат int

floorMaterial публичное свойство

public Material floorMaterial
Результат Material

floorPrefab публичное свойство

public SemanticObjectSimple, floorPrefab
Результат SemanticObjectSimple,

forceStackedItems публичное свойство

public int forceStackedItems
Результат int

gridDim публичное свойство

public float gridDim
Результат float

intensityCeilingLights публичное свойство

public float intensityCeilingLights
Результат float

list_rands публичное свойство

public List list_rands
Результат List

maxPlacementAttempts публичное свойство

public int maxPlacementAttempts
Результат int

minStackingBases публичное свойство

public int minStackingBases
Результат int

numCeilingLights публичное свойство

public int numCeilingLights
Результат int

permittedItems публичное свойство

public List permittedItems
Результат List

randomMaterials публичное свойство

public bool randomMaterials
Результат bool

roomDim публичное свойство

public Vector3 roomDim
Результат Vector3

scaleRelatDict публичное свойство

public JsonData,LitJson scaleRelatDict
Результат LitJson.JsonData

scene_scale_con публичное свойство

public string scene_scale_con
Результат string

scene_scale_mean публичное свойство

public float scene_scale_mean
Результат float

scene_scale_seed публичное свойство

public int scene_scale_seed
Результат int

scene_scale_var публичное свойство

public float scene_scale_var
Результат float

shouldUseGivenSeed публичное свойство

public bool shouldUseGivenSeed
Результат bool

shouldUseStandardizedSize публичное свойство

public bool shouldUseStandardizedSize
Результат bool

showProcGenDebug публичное свойство

public bool showProcGenDebug
Результат bool

skyboxMaterial публичное свойство

public Material skyboxMaterial
Результат Material

standardizedSize публичное свойство

public Vector3 standardizedSize
Результат Vector3

useStandardShader публичное свойство

public bool useStandardShader
Результат bool

use_cache_self публичное свойство

public int use_cache_self
Результат int

use_mongodb_inter публичное свойство

public int use_mongodb_inter
Результат int

wallMaterials публичное свойство

public List wallMaterials
Результат List

wallTrimMaterial публичное свойство

public Material wallTrimMaterial
Результат Material

windowMaterial публичное свойство

public Material windowMaterial
Результат Material

windowTrimMaterial публичное свойство

public Material windowTrimMaterial
Результат Material