F
F
Flaimer2021-05-13 17:45:01
Unity
Flaimer, 2021-05-13 17:45:01

How to open the game with certain parameters through the command line?

It is necessary to open a game made in Unity through the command line, the parameters will be used to determine whether the player is authorized or not.

public static bool IsSingned()
 {
 string[] args = Environment.GetCommandLineArgs();
 int i = 0;
 foreach (string arg in args)
 {
 if (i > 0 && arg == "signed")
 return true;
 i++;
 }
 return false;
 }

Here is an example code, where should it be inserted and where should it be used?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2021-05-13
@freeExec

At any. But the system of protection level "student".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question