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 iviaguic · Aug 24, 2013 at 10:08 AM · script loadingexternal filesexternal tools

Load Unity Scenes from external applications

I want to load different Unity Scenes from a external app (that would act as a launcher) tham im going to write in C#.

Is it possible to make a script that tells unity to load a scene?

Thank You very Much

Comment
Add comment · Show 2
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 $$anonymous$$ · Aug 24, 2013 at 11:32 AM 0
Share

Application.LoadLevel ("HighScore"); ? http://docs.unity3d.com/Documentation/ScriptReference/Application.LoadLevel.html

avatar image iviaguic · Aug 24, 2013 at 01:09 PM 0
Share

@Le_Vailus, thats in game script, I can't just write it in the external app because it won't work, but thanks for replying anyway ;)

1 Reply

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

Answer by LemonLake · Aug 24, 2013 at 11:52 AM

I would suggest writing this in Java instead, as Java is much like C# however it is cross platform without need for a wrapper such as Mono or Wine.

As for the scene reading, I suggest you have a look at this: http://answers.unity3d.com/questions/138715/read-command-line-arguments.html

Then you would launch your game file with added launch parameters. So to clear things up: You would create a script in your game that reads the parameters passed in your build file. That script would then use Application.LoadLevel to load the scene. Finally your launcher will launch the game with those parameters and a scene number in the build parameters.

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 iviaguic · Aug 24, 2013 at 12:00 PM 0
Share

Hey, thank you very much ;) I don't have any idea on how to launch the game with the added parameters.

Thank you anyway ;)

avatar image LemonLake · Aug 24, 2013 at 12:02 PM 0
Share

If you write it in Java (not JavaScript!), like I suggested, here's how: Process process = new ProcessBuilder("C:\\PathToExe\\$$anonymous$$yExe.exe","param1","param2").start();

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

16 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

Related Questions

Loading a font via WWW 0 Answers

Is there a external script language compatible with every platforms in unity? 0 Answers

Saving informations from game 3 Answers

Upload files to a database 2 Answers

Unity Serilizer taking to long to Save/load? 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