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
1
Question by Natanijel · Dec 15, 2012 at 09:41 PM · buildscenecrashchangedevelopment

Game Crash When Changing Scene

Hello :D,

I have a game that contains two scenes. One scene is the menu scene and the other one is the gameplay scene. When I press play on the menu scene, it transfers me to the gameplay. Everything works fine in Unity when I click play.

However, when I build both scene, the application (i have a mac) crashes when I click play. However, when I build it AS A DEVELOPMENT BUILD, everything works fine. Why is it behaving in such a way?

Thanks for the help!

Muhasaresa :) ---||---

Comment
Add comment · Show 4
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 clunk47 · Dec 16, 2012 at 02:04 AM 1
Share

You're obviously not getting errors, or it wouldn't run. But are you getting any WARNINGS? Check the log.

avatar image Natanijel · Dec 16, 2012 at 01:25 PM 0
Share

You are right. I got a Warning that was complaining about scripts that I didn't even write or use! These were located in the Standard Assets folder that caused the issues: "ActivateTrigger", "$$anonymous$$eshCombineUtility" and some mobile Joystick script. I just commented out the affected areas and now it works.

There is just one more detail that doesn't work. I made myself a custom cursor, and it shows in Unity, but when I built the scene it doesn't. Is there some tick box I am missing?

Thanks a lot for your help!

$$anonymous$$uhasaresa

avatar image clunk47 · Dec 16, 2012 at 03:46 PM 1
Share

Are you using Unity 4.0 Custom HARDWARE cursor, or just a custom cursor script? If just a script, I can share $$anonymous$$e with you.

avatar image clunk47 · Dec 16, 2012 at 03:48 PM 1
Share

I will post my comment as an answer along with a custom cursor script if you don't $$anonymous$$d accepting the answer, that is, if it all works for you. You can also vote up (thumbs up icon) the answer if you wish, Accpet answer is Check$$anonymous$$ark. Of course don't accept or vote up if it doesn't work :) I will go ahead and vote up your question to give you some karma points regardless.

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by clunk47 · Dec 16, 2012 at 03:50 PM

So we have establised you are getting no warnings, since you are able to run the standalone. If you are getting WARNINGS, however, take a look at the console or log and find what scripts are causing the Warnings. As far as the custom cursor question, I have posted a C# script to allow you to use your own in game cursor, which will also work in the Standalone build :)

 using UnityEngine;
 using System.Collections;
 
 public class CustomCursor : MonoBehaviour
 {
     public Texture2D cursor;
     Vector2 mouse;
     public float width = 64;
     public float height = 64;
     Rect cursorPosition;
 
     void Update()
     {
         mouse = new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y);
         if(Screen.showCursor)
             Screen.showCursor = false;
     }
 
     void OnGUI()
     {
         cursorPosition = new Rect(mouse.x, mouse.y, width, height);
         GUI.DrawTexture(cursorPosition, cursor, ScaleMode.ScaleToFit);
     }
 }
Comment
Add comment · Show 2 · 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 Natanijel · Dec 16, 2012 at 06:05 PM 2
Share

Thank you so much :D

avatar image clunk47 · Dec 16, 2012 at 06:06 PM 1
Share

Thank YOU! Have a wonderful day :)

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

10 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

Related Questions

Distribute terrain in zones 3 Answers

Apps crash in development build 0 Answers

SetCursor WebGL doesn't work 1 Answer

Unity app crashes after splashscreen when testing with TestFlight 3 Answers

Editor Crash: Where is Scene Data kept? 3 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