- Home /
loading a folder of textures to an array
hi there friends i have go a really problem because i am really very bad with arrays and lists , here is my problem: 1:-i want a script to load a folder of textures in to array. 2:-i want it also to load someobjects (its done). 3:-then do a way so that it assigns each texture to the name of the object in the lightmap index.
in simple words i want a script to load the lightmaps and the objects that needed to be lightmapped , then assigns an index number to each object then assigns the lightmap to proper index based on the names of the object and lightmap.
Note:i am using vray to light.
here is my script that i do so far.
var lightMappedObjects : GameObject[];
var lightMapsTextures : Object[];
function Start () {
lightMappedObjects = GameObject.FindGameObjectsWithTag("LightMapped");
lightMapsTextures = Resources.LoadAll("LightMaps");
}
function Update () {
}
thanks for any help i get
Your answer
Follow this Question
Related Questions
Find index number in an Array of a transform by it's name 1 Answer
List gives "Array index is out of range" for no reason 2 Answers
Input wont work!!! 0 Answers
Loading Textures from AssetBundle 0 Answers