Tags: KSP2Redux/SDK
Tags
Read authoring preset IDs on this side of the assembly boundary PartAudioPresetRegistry.GetAuthoringPresetIds sits behind #if UNITY_EDITOR in the game code because it uses AssetDatabase, so it is compiled out of the shipped Assembly-CSharp that this package builds against. Calling it works inside the ksp2redux repo and fails with CS0117 for anyone consuming this package against a real game install. Unlike the ClearEditorImportSession case, this one cannot be fixed by shipping the method: AssetDatabase can never exist in a runtime assembly. The scan is reproduced here instead, which is where it belongs anyway since this package is editor only. The built-in fallback still calls into the game code, because CreateBuiltinDefinitionsForAuthoring sits outside the guard and does ship.
Make reflection always look for public members in addition to non-pub… …lic for the sake of publicization in the editor
PreviousNext