Esempio n. 1
0
        public InstancedMesh(Scene scene, Scene subScene, Transform transform)
        {
            var instancedMeshSettings = new InstancedMeshSettings {
            };

            instancedMeshSettings.subScene  = subScene.Get();
            instancedMeshSettings.transform = Common.ConvertTransform(transform);

            var status = API.iplInstancedMeshCreate(scene.Get(), ref instancedMeshSettings, out mInstancedMesh);

            if (status != Error.Success)
            {
                throw new Exception(string.Format("Unable to create instanced mesh ({0}). [{1}]", transform.gameObject.name, status));
            }
        }