BLACKISH DEV BLOG Support
 

 

changing prefab-script-variables from within the game

I was looking for a way to save moves that happen in the game. After some discussions on IRC and getting very close to writing out textfiles, I figured out a way to do it more easily:

If I Resource.Load(“name”, type) a script that I have on a prefab in the Resources folder without instantiating it, I can then write my values in there and they persist even when I stop the game!

Bookmark the permalink. Follow any comments here with the RSS feed for this post. Trackbacks are closed, but you can post a comment.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>