Update api.md

This commit is contained in:
Ben C 2022-05-10 16:20:34 -07:00 committed by GitHub
parent b84301d4d0
commit 836081f971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,8 @@ public interface INewHorizons
UnityEvent<string> GetChangeStarSystemEvent(); UnityEvent<string> GetChangeStarSystemEvent();
UnityEvent<string> GetStarSystemLoadedEvent(); UnityEvent<string> GetStarSystemLoadedEvent();
GameObject SpawnObject(GameObject planet, Sector sector, string propToCopyPath, Vector3 position, Vector3 eulerAngles, float scale, bool alignWithNormal)
string[] GetInstalledAddons(); string[] GetInstalledAddons();
} }
@ -43,3 +45,5 @@ You can then use the APIs `LoadConfigs()` method to load from a "planets" folder
The `GetChangeStarSystemEvent` and `GetStarSystemLoadedEvent` events let you listen in for when the player starts changing to a new system (called when entering a black hole or using the warp drive) and when the system is fully loaded in, respectively. The `GetChangeStarSystemEvent` and `GetStarSystemLoadedEvent` events let you listen in for when the player starts changing to a new system (called when entering a black hole or using the warp drive) and when the system is fully loaded in, respectively.
You can also use the `GetInstalledAddons` method to get a list of addons that are installed and enabled. You can also use the `GetInstalledAddons` method to get a list of addons that are installed and enabled.
You can also use `SpawnObject` to directly copy a base-game GameObject to the specified position and rotation.