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 Epenetus · Apr 15, 2017 at 08:13 AM · unity 5editor-scriptingeditorguiassetdatabase

Unable to load asset at path with unity tutorial code

I'm trying to use the following tutorial to get a better understanding of creating editor interfaces in unity and loading custom assets: https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/scriptable-objects

I'm currently only focusing on the latter part of the tutorial which involves creating a simple editor for an inventory system. I've copied everything from the tutorial verbatim into my project and have been able create and edit new inventory list assets. However, when I reload the editor and open the saved inventory item list, the function AssetDatabase.LoadAssetAtPath(...) returns null and is unable load the inventory list. I have checked that the actual asset does exist on the disk.

Also, since I have simply copied and pasted the tutorial into my project, I would expect that this should be working unless something has changed in asset loading/save in unity since the tutorial was created.

Are there any steps that may be missing in the tutorial that I need to following for asset loading? Is there anyway to retrieve information on why AssetDatabase.LoadAssetAtPath failed to load?

Edit: I notice that on load, the assets are not able to be edited by clicking on them in the content browser. They have the following error being displayed: "The associated script can not be loaded. Please fix any compile errors and assign a valid script."

I noticed if I recompile/touch the InventoryItemList.cs then it appears that the asset loads properly. Any idea what this could be?

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
Best Answer

Answer by Epenetus · Apr 17, 2017 at 07:18 PM

I ended up being able to fix the issue. It appears that I needed to have each scriptable object class have it's own .cs file. I found this by forcing serialization to be text and noticing that the script GUID were null.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

(Editor Scripting) How to create a list view 1 Answer

[ExecuteInEditMode] OnEnable Running twice on Play? 1 Answer

BoxBoundsHandle rotation 2 Answers

Create a dropdown with folder depth structure in Editor 1 Answer

ObjectField Get object type(Asset, Scene Object) 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