- Home /
Finding assets from script
Hello,
Is there a possibility to find all assets with given part of name? I mean they are not loaded. Just stored somewhere in the assets. The way to get all of the assets names to search inside them manually is also solution.
You may want to correct the question subject to "finding".
Answer by duck · Feb 22, 2010 at 04:11 PM
For looking up assets by name, they need to be in the Resources folder. However, it's worth nothing that this is generally not the generally recommended way of referencing assets for the purpose of instantiating objects etc.
There are legitimate uses for the Resources folder, and looking up assets by name, however you should be sure that you understand the benefits of the other methods of accessing other objects before deciding that the Resources folder method is the most appropriate for your case.
Thank you for the response. As far as I understood this methods are for accessing objects by their full name. But is there a method to get list of this full names?
Answer by Ashkan_gc · Feb 22, 2010 at 05:43 PM
there are two ways for finding assets with their name and path. the first one is resource folders and the second one is asset bundles. asset bundles are packs of assets and you can load them with www class. simply put the inside your project folder and use www ("file://path/assetbundleName");
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How to create prefabs from Editor scripts? 2 Answers
How can I find all instances of a Scriptable Object in the Project (Editor) 3 Answers
How to look for a material in Assets folder and sub-folders? 1 Answer
OnPreprocessModel() override for individual changes??? 1 Answer