Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Tomer-Barkan · Jun 21, 2013 at 08:33 AM · 2derrororthello

Orthello MissingReferenceException when loading screens

I'm using Orthello 2d to try and develop a 2d game in Unity, and I'm encountering a problem I have no idea how to deal with.

I've got two scenes - one is a level scene, which shows you which level you're in (using a gameobject that remains between scenes and contains the level number), and one is the game scene. When you win the game scene, the level is increased by one, and the level scene is loaded with Application.LoadLevel().

My problem is, that after once or twice that the game is won, the level increases by one, and then after the game scene is loaded I start getting these errors:

 MissingReferenceException: The object of type 'Transform' has been destroyed but you are still trying to access it.
 Your script should either check if it is null or you should not destroy the object.
 OTObject.get_worldPosition () (at Assets/Orthello/Standard Assets/OT/_Base/OTObject.cs:1121)
 OT.Drag (.OTDragObject o, Vector2 pos) (at Assets/Orthello/Standard Assets/OT/_Base/OT.cs:1988)
 OT.DragControl (.OTObject dragObject) (at Assets/Orthello/Standard Assets/OT/_Base/OT.cs:2076)
 OT.Update () (at Assets/Orthello/Standard Assets/OT/_Base/OT.cs:2256)

Since this is pure Orthello code that is giving the error, I have no idea even where to start. Has anyone ever encountered something like this? Any ideas what possible reasons could cause this error in Orthello 2d?

Edit:

Through trial and error, I figured out it happens only when the level ends (and I load a new level), while dragging an object with the mouse (orthello draggable object). Same thing doesn't happen when using mobile and dragging with touch. Any ideas on how to fix it?

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

Answer by mas · Jun 22, 2013 at 12:41 PM

You have indeed found a little bug that needed to be squashed. solution (will be rolled out in a future update)

add to OT.cs : line 3233 : in void OnLevelWasLoaded(int Level)

  OTDragObject.Clear();

This will clear and initializes all active drag and drop handling stuff when a new level is loaded.

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 Tomer-Barkan · Jun 22, 2013 at 01:32 PM 0
Share

Thanks! I added it as the first command in the function you mentioned and it worked. (wasn't 3233 though, was more like 3223 for me).

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

15 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

Related Questions

2D Animation does not start 1 Answer

Play Protect error upon installation 0 Answers

Raytrace vs Rect.Contains 0 Answers

WebGL build is getting cached in the browser, users cannot see updates... 0 Answers

Making my 2d character's arm follow the mouse, scrpit not working, please help :c 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