Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by siddharth3322 · Nov 11, 2016 at 05:27 PM · loadresourcesresources.loadloading screenloadlevelasync

Resource folder resources loading

I want to know about multiple points:

  1. When Resource folder data gets loaded in memory?

  2. At scene loading time I want to load many resources via Resource.Load() then how to deal with loading screen? Based on previous scene selection, next scene resources get loaded so I want to display loading screen over here so its seems like continuous, normal scene resources get loaded as well specific choice based resources get loaded.

Please give me some suggestion for my above points.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Feyyyyy · Nov 11, 2016 at 07:54 PM

1) In unity loading resources done in 2 ways.

a. Use Resources.Load method.

b. link from scene. For example you can write a script like below to instantiate prefabs;

     public class PrefabInstantiator :MonoBehaviour{
         public GameObject[] objectResources;// fill this aray from editor
         void Start() {
             for (int i = 0; i < objectResources.Length; i++) {
                 Instantiate(objectResources[i]);
             }
             // in your case this script might be a lot more complicated but i think you get the point
         }
     }

For second method to work you don't need to put your assets or prefabs into Resource folder. In fact you need to avoid putting stuff in Resource folder as much as possible because resource folder always goes to build. But if you put your assets or prefabs in another folder, those assets or prefabs only goes to the build if they are referenced from the game. If not unity ignores them and saves you from the job of deleting unnecessary assets.

Putting stuff in Resource folder and using Resources.Load method has its advantages, for example you decide when to load objects.

2) You can use Resources.LoadAsync. As I mentioned above putting assets to Resource folder is not good but you need to use that Resources.Async method. Good way of mixing these 2 methods is to put your small assets (like prefabs) to Resource folder and big assets (like Textures, meshes, animations, etc.) to other folders and reference big assets from prefabs, and use Resources.LoadAsync method to load prefabs. This way you can show loading screen while your big assets are loaded and you avoid putting big assets to Resource folder.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

59 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Resources.Load(path+name) as texture == null reference 7 Answers

How can I overcome the 2GB Resource File Limit and load more than 2GB of assets into the scene? 1 Answer

Altering prefab at runtime. Works in editor, not in build. 2 Answers

Resources load on editor 0 Answers

How to properly load textures? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges