|
I want a different program to execute my game with a command line that contains various parameters such as the level number. Is that possible with a Unity exe?
(comments are locked)
|
|
It is possible to run unity with some predefined command lines for more info look at this page. if u are passing ur custom command lines like level u should be able to read them through the following function, System.Environment.GetCommandLineArgs() but i doubt if it will help u!!... What are u planning to do exatly?! if u want to start the game with the level progress (like saving game data and loading on startup), you can use a loading screen that loads the saved level number from last time using Playerprefs class. If it is for testing purpose have a menu in the loading screen(simple gui buttons) to skip to the level u want!! Anyway i think it was helpful :) I can't tell you exactly what I'm doing, but all I can say is that is great news. It was either going to be that, or a .txt file that contains the parameters. Well, thank you. That was very helpful as I tried typing "CommandLine" in the script reference search and nothing came up.
Dec 16 '11 at 12:02 AM
Rush3fan
oh if u r a c# user try searching in msdn first and then chk if it is compatible with mono(Unity) :D that is how i do always :D This is the list of all c# functions and classes supported in unity!
Dec 16 '11 at 04:12 AM
flamy
I try to put everything in javascript. I like C++, but C# is hard to learn and javascript seems to be more popular in Unity.
Dec 16 '11 at 04:19 AM
Rush3fan
even is started with js and thought it would be enough for ever! but ya all depends on one's personal preference, no probs with using js (Except if u want to use native plugins!) also the list i have given above is not restricted only to c# u can use them in js aslo, u have to use import ; to access it in ur code and use it the same way as c# users do!
Dec 16 '11 at 05:23 AM
flamy
Ok, thanks flamy!
Dec 16 '11 at 05:36 AM
Rush3fan
(comments are locked)
|
