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 /
This question was closed Sep 18, 2014 at 03:06 PM by CrilleStyles for the following reason:

Edit: I just had to destroy the manager

This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by CrilleStyles · Sep 18, 2014 at 02:43 PM · errorspawnloadlevel

On carachterspawn level load error?

Warning: this following question might be unclear.

I made something and I'm not sure why I can't move or why the entire scene lags when I spawn. Any ideas? I have my scrips here:

 #pragma strict
 
 var Spotlight : GameObject;
 var isClass1 : boolean = false;
 var isClass2 : boolean = false;
 var OtherOBJ : GameObject;
 
 function Start () 
 {
 Spotlight.SetActive(false);
 }
 
 function OnMouseEnter () 
 {
 Spotlight.SetActive(true);
 Debug.Log("Entered collider");
 }
 
 
 function OnMouseExit () 
 {
 Spotlight.SetActive(false);
 Debug.Log("Exited collider");
 }
 
 
 function OnMouseUp () 
 {
 Debug.Log("Clicked box");
 Selected();
 }
 
 function Selected()
 {
 if (isClass1 == true)
     {
      var script: Manager = OtherOBJ.GetComponent(Manager);
       script.spawnClass1 = true;
     }
     if (isClass2 == true)
     {
       script.spawnClass2 = true;
     }
 }
 

 
 #pragma strict
 
 var spawnClass1 : boolean = false;
 var spawnClass2 : boolean = false;
 
 var Class1 : GameObject;
 var Class2 : GameObject;
 
 function Update()
 {
 if(spawnClass1 == true)
     {
     Debug.Log("Will Spawn 1");
     LoadLevel();
     }
     if(spawnClass2 == true)
     {
     Debug.Log("Will Spawn 2");
     LoadLevel();
     }
 }
 
 function LoadLevel()
 {
 DontDestroyOnLoad(gameObject);
 Application.LoadLevel("Test range");
 Spawn();
 }
 
 function Spawn()
 {
 if(spawnClass1 == true)
     {
     Debug.Log("Spawned 1");
     Instantiate (Class1, Vector3(473, 44, 1213), Quaternion.identity);
     }
     if(spawnClass2 == true)
     {
     Debug.Log("Spawned 2");
     Instantiate (Class2, Vector3(473, 44, 1213), Quaternion.identity);
     }
 }

I got some screen shots to about how it shold look like and what it looks like.

alt text

what it looks liek.jpg (159.0 kB)
how it really should look.jpg (140.4 kB)
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

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

23 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

Related Questions

SendMessage setName has no receiver! 1 Answer

Is there anything wrong with this script? It used to work but now it doesn't. 2 Answers

Spawn Script Issue 0 Answers

iOS FPS Kit 0 Answers

Error Code BCE0044 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