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 Tourist · Mar 27, 2013 at 05:40 PM · crashloadlevelstandalone

Player crash during the loading of a level

In my project, i have different scenes and I am encountering a problem with one of them.

I have a pathfind generator that builds a list of nodes and links (both ScriptableObject), serialized in a MonoBehaviour derived class. The generator works great : visual representation is correct.

When I start the level in the Editor, it's OK.

When I start the default level and load this level in the Editor, it's OK.

The problem occurs when i try to load this level from a standalone player. I looked at the output_log but there is no error or warning.

EDIT :

I have found what lines are causing the issue. But I can't figure out why it is happening. In a script that is executed only in the Editor for the generation of my pathfind, I check if there is a wall between two nodes using a set of raycasts. This set is used to set the proper type of the link (normal, through window...) between the two nodes.

The error in the standalone players appears only when : - the link type is a window - the link is joining a left node to a right one (see code below)

 PathNode.ENeighbor eInversedNeighbor = PathNode.GetInversedNeighbor(a_eNeighbor); // right if a_eNeighbor is left, back if it is front...
 
 PathLink link = ScriptableObject.CreateInstance<PathLink>();
 link.SetNodes(Me, Neighbor, nLinkType); // just setting some serialized attributes
 Me.SetLink(a_eNeighbor, link); // just setting some serialized attribute
 Neighbor.SetLink(eInversedNeighbor, link); // idem for the other node
 
 // add the link to the path holder
 PathHolder path = (PathHolder)serializedObject.targetObject;
 path.m_lLinks.Add(link);

if I comment the line " Me.SetLink(a_eNeighbor, link);", the level can be loaded.

The function SetLink :

 public void SetLink(ENeighbor a_eNeighbor, PathLink a_Link)
 {
   Assertion.Assert(a_Link != null, "invalid link");
   Assertion.Assert(GetLink(a_eNeighbor) == null, "link already set.");
 
   switch(a_eNeighbor)
   {
     case ENeighbor.eLeft: m_LeftLink = a_Link; break;
     case ENeighbor.eRight: m_RightLink = a_Link; break;
     case ENeighbor.eFront: m_FrontLink = a_Link; break;
     case ENeighbor.eBack: m_BackLink = a_Link; break;
     default: Debug.LogError("Invalid Neighbor"); break;
   }
 }
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 gribbly · Mar 27, 2013 at 07:22 PM

Add a GUITexture temporarily, and log messages to it that show you were you are in your code. When it crashes, you'll be able to see the last message and figure out roughly where it's crashing. You can also log object names/nulls etc.

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 Tourist · Mar 27, 2013 at 08:13 PM 0
Share

it is crashing during the loading of the level by unity engine.

  • None of my level scripts get the Awake message.

  • None of my ScriptableObject get the Enable message.

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

11 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

Related Questions

Standalone server crash 1 Answer

Game crashes on Loadlevel when called on a swipe event 1 Answer

Unity crashes on building project 2 Answers

Game crash on Ubuntu 2 Answers

crash in standalone but not in editor - appears to be caused by UI 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