Where to save the script during manual initialization

Posted: 05 Jan 2022 04:37
by JohnDoe

If I want to manually initialize and open NaniScript from within a C# script, where should I store NaniScript in the folder?

When the Initializetion Script is on, it is recognized that it is sufficient to set the corresponding Script in the Start Game Script item.
However, when I initialize the game manually, there is a command to select the Script to load, but I don't know where to set the Script.

I use the following command.

Code: Select all

await player.PreloadAndPlayAsync("StartScript");

In that case, I get the following error

Code: Select all

Exception: Failed to load `StartScript` script: The resource is not available.

I'm sorry for the newbie question, but I would appreciate it if you could tell me.


Re: Where to save the script during manual initialization

Posted: 05 Jan 2022 06:24
by JohnDoe

I solved it myself.

It seems that the problem was that the NaniScript in question was copied from an external source and brought here.
I created a new Script with the same name in the project, and it worked fine.

By the way, is there any way to recognize the NaniScript copied from outside?


Re: Where to save the script during manual initialization

Posted: 05 Jan 2022 08:32
by Elringus

Re: Where to save the script during manual initialization

Posted: 11 Jan 2022 00:43
by JohnDoe

Thank you, that was very helpful.