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 /
This question was closed May 09, 2017 at 11:46 PM by elenzil for the following reason:

Question is off-topic or not relevant

avatar image
0
Question by elenzil · May 09, 2017 at 05:33 PM · collisionresourcescompilefilename

feature request: detect resource filename collisions at compile-time

Using unity 5.4.1, it's cool to have multiple "Resources" folders.

eg,

 foo/Resources/foo.txt
 bar/Resources/bar.txt

and if you do Resources.load("bar"), it works, yay!

however, if there's two resource files w/ the same name, like this:

 foo/Resources/blah.txt
 bar/Resources/blah.txt

then Resources.Load() will choose one of them without any warns or errors.

imo, this situation should be a compile-time error.

Comment
Add comment · Show 1
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
avatar image ARKMs · May 10, 2017 at 07:29 PM 0
Share

I made a script that can help with this:

ResourcesCheckConflict.cs

3 Replies

  • Sort: 
avatar image
0

Answer by JustAnotherDude · May 09, 2017 at 10:04 PM

This is not a question, post it on https://feedback.unity3d.com/

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
avatar image
0

Answer by Bunny83 · May 09, 2017 at 10:07 PM

I agree that this can cause some confusion. However i think you still should be able to load both resources with Resources.LoadAll. Resources are not files but just assets. The name of the asset is just another datafield. Like in most databases you can have multiple entries with the same data (unless the column is set to be unique / is a primary key).

Though if you want to make a feature request you should post it on feedback

Comment
Add comment · Show 1 · 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
avatar image unityBerserker · May 10, 2017 at 06:20 PM 0
Share

A month ago I create a lot of test of Resources class.

If we load assets with method Resources.Load("name") we are loading all assets with that name in resources folder.

We don't care about type of asset. If we have three assets with same name but different types like name.txt, name.prefab and name.mat, next we use Resources.Load("name") we will load those tree assets to memory.

We can filtrate returned result simply by using generic version of Load() method (or with method with second argument.) Even if we use generic version of method Load() it always load all assets with given path/name.

avatar image
0

Answer by elenzil · May 09, 2017 at 11:45 PM

thanks @RafaelF82 and @Bunny83 - moved to feedback here, and closing this.

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

Follow this Question

Answers Answers and Comments

102 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 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

Failed to recompile resources Facebook sdk integration with admob, unity ads plugin 1 Answer

Loading Resources folder contents in StandAlone Player 1 Answer

Best way use Resources.Load for spcific type? 1 Answer

Physic based golf game - ball bouncing off the connection of colliders on flat surface 2 Answers

Attaching objects on collision 1 Answer


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