Exemplo n.º 1
0
        public LoziMeshCollection(GameObject obj)
        {
            meshObjects = new List <LoziMesh>();

            foreach (Transform transform in obj.GetComponentsInChildren <Transform>())
            {
                Mesh mesh = LoziMesh.getMesh(transform.gameObject);
                if (mesh != null && canAddInArray(mesh))
                {
                    meshObjects.Add(new LoziMesh(transform.gameObject));
                }
            }
        }
Exemplo n.º 2
0
        public Texture getLightMap(GameObject target)
        {
            Renderer renderer = LoziMesh.getRenderer(target);

            if (renderer != null && renderer.lightmapIndex > -1)
            {
                if (LightmapSettings.lightmaps[renderer.lightmapIndex].lightmapFar != null)
                {
                    return(LightmapSettings.lightmaps[renderer.lightmapIndex].lightmapFar);
                }
            }
            return(null);
        }
Exemplo n.º 3
0
 //sets component of type if exists
 private void setComponents()
 {
     if (LoziMesh.hasMesh(obj))
     {
         mesh = LoziExporter.instance.meshCollection.getMeshByGameObject(obj);
     }
     if (LoziMaterial.hasMaterial(obj))
     {
         material = LoziExporter.instance.materialCollection.getMaterialByGameObject(obj);
     }
     if (LoziCamera.hasCamera(obj))
     {
         camera = new LoziCamera(obj);
     }
     if (LoziLight.hasLight(obj))
     {
         light = new LoziLight(obj);
     }
     if (LoziAnimation.hasAnimation(obj))
     {
         animation = LoziExporter.instance.animationCollection.getAnimationByGameObject(obj);
     }
 }
Exemplo n.º 4
0
 public LoziMesh getMeshByGameObject(GameObject obj)
 {
     return(getMeshByMesh(LoziMesh.getMesh(obj)));
 }