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 awsome129 · Mar 01, 2017 at 07:16 AM · terrainloadresources.loadgeneratorlevel load

Why won't my terrain load.

I made a script that gets the player's world settings from the world setttings menu, and then load s the settigns in the next scene when the player continues. The terrain won't spawn. Please Help!!

Script in world settings menu: using System.Collections; using System.Collections.Generic; using UnityEngine; public class WorldSettings : MonoBehaviour { public bool FlatTerrain = false; public bool SemiBumpyTerrain = false; %|133382897_3|% // Use this for initialization void Start() %|-1971751899_6|% %|1244436034_8|% // Update is called once per frame %|-657146416_10|% %|-890458070_11|% %|-251084513_12|% %|-562753640_13|% { FlatTerrain = true; Application.LoadLevel("level1"); %|-582002089_17|% public void SemiBumpy() %|-831506893_19|% SemiBumpyTerrain = true; Application.LoadLevel("level1"); } public void VeryBumpy() { %|-526449255_25|% Application.LoadLevel("level1"); %|686669248_27|% }

Script in level after world settings: using System.Collections; using System.Collections.Generic; using UnityEngine; public class LoadWorldManager : MonoBehaviour { %|131026995_28|% public GameObject SemiBumpyTerrain; %|1237642956_30|% %|-902328880_31|% private WorldSettings WorldSettingsScript; %|-273883866_33|% { %|-1035811350_35|% FlatTerrain = Resources.Load("Flat_Terrain") as GameObject; %|-1575055408_37|% %|-562377359_38|% WorldSettingsScript = GameObject.Find("WorldSettings").GetComponent<WorldSettings>(); %|1449107905_40|% // Use this for initialization %|-1750449121_42|% %|1783188651_43|% { Instantiate(FlatTerrain, WorldSpawnPos, transform.rotation); %|1936957349_46|% if (WorldSettingsScript.SemiBumpyTerrain) { %|-70310332_49|% %|-1273183901_50|% if (WorldSettingsScript.VeryBumpyTerrain) %|-1583253834_52|% Instantiate(VeryBumpyTerrain, WorldSpawnPos, transform.rotation); %|882424543_54|% %|376581494_55|% { %|1821030991_57|% } %|-1166234788_59|% { Instantiate(VeryBumpyTerrain, WorldSpawnPos, transform.rotation); } %|-1005049537_63|% %|-1308870501_65|% %|-2139788344_66|% %|1449002551_67|% }

THX!!!

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

· Add your reply
  • Sort: 

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

Resources.Load(path+name) as texture == null reference 7 Answers

Saving a randomly generated Terrain 1 Answer

Resource folder resources loading 1 Answer

Mass terrain generation 1 Answer

terrain generator (looking for a product) 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