Search found 3 matches

by Galder
Fri Jan 15, 2021 11:43 am
Forum: General Discussion
Topic: Loading tons of vars instead of a complete script or GO
Replies: 5
Views: 1252

Re: Loading tons of vars instead of a complete script or GO

Yep. The script to save using System.Collections.Generic; using UnityEngine; using TMPro; using UnityEngine.UI; using System; [ES3Serializable] public class TalentTurretManager : MonoBehaviour { public bool doubleCannon; // public bool reloadTime; //done public bool autoClick; //done public bool bos...
by Galder
Fri Jan 15, 2021 10:30 am
Forum: General Discussion
Topic: Loading tons of vars instead of a complete script or GO
Replies: 5
Views: 1252

Re: Loading tons of vars instead of a complete script or GO

Hey! thanks for the quick reply! Not all the variables are going to exists, at least at the begining of the game or mid game. So thats the reason I must check every key instead of using FileExists. On the other hand, the defaultvalue override method, (Load<type>("key", 0)) doesn´t load the...
by Galder
Fri Jan 15, 2021 9:21 am
Forum: General Discussion
Topic: Loading tons of vars instead of a complete script or GO
Replies: 5
Views: 1252

Loading tons of vars instead of a complete script or GO

Hi! I have some doubts about how to load correctly my vars. I had a deep look into the docs and my general load scripts looks like this: if(ES3.FileExists()) { if(ES3.KeyExists("myKey")) myVar = ES3.Load<type>("myKey"); } Ok, that should be correct. But the thing is, I have not o...