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));
                }
            }
        }
Beispiel #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);
        }
Beispiel #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);
     }
 }
 public LoziMesh getMeshByGameObject(GameObject obj)
 {
     return(getMeshByMesh(LoziMesh.getMesh(obj)));
 }