//Init the API Hooks internal static void APIAwake() { //set up the hookable object fetch = HaystackResourceLoader.fetch; //set up any events we need from the core code //flag it ready APIReady = true; }
private void APIDestroy() { //tear it down fetch = null; //Tear down any events we need to remove //try { //} catch (Exception) { } APIReady = false; }
/// <summary> /// Awake Event - when the DLL is loaded /// </summary> public void Awake() { fetch = this; API.APIAwake(); DontDestroyOnLoad(this); Resources.LoadTextures(); Resources.PopulateVesselTypes(ref Resources.vesselTypesList); Resources.vesselTypesList.Sort(new HSUtils.SortByWeight()); this.Settings = new Settings(); }
public void OnDestroy() { toolbarControl.OnDestroy(); Destroy(toolbarControl); fetch = null; }