|
|
|
|
|
|
|
|
|
|
void InitGameObjectRecursive(GameObject gameObject, MaterialPropertyBlock mpb, Labeling labeling, uint instanceId) |
|
|
|
{ |
|
|
|
var meshRenderer = gameObject.GetComponent<MeshRenderer>(); |
|
|
|
if (meshRenderer != null) |
|
|
|
var renderer = (Renderer)gameObject.GetComponent<MeshRenderer>(); |
|
|
|
if (renderer == null) |
|
|
|
renderer = gameObject.GetComponent<SkinnedMeshRenderer>(); |
|
|
|
|
|
|
|
if (renderer != null) |
|
|
|
meshRenderer.GetPropertyBlock(mpb); |
|
|
|
renderer.GetPropertyBlock(mpb); |
|
|
|
pass.SetupMaterialProperties(mpb, meshRenderer, labeling, instanceId); |
|
|
|
pass.SetupMaterialProperties(mpb, renderer, labeling, instanceId); |
|
|
|
meshRenderer.SetPropertyBlock(mpb); |
|
|
|
renderer.SetPropertyBlock(mpb); |
|
|
|
} |
|
|
|
|
|
|
|
for (var i = 0; i < gameObject.transform.childCount; i++) |
|
|
|