Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes MASFlightComputer to create GameObjects during the start function. #352

Merged
merged 1 commit into from Aug 6, 2022

Conversation

Angel-125
Copy link
Contributor

This fixes the following error:
[EXC 10:00:19.247] UnityException: Internal_CreateGameObject is not allowed to be called from a MonoBehaviour constructor (or instance field initializer), call it in Awake or Start instead. Called from MonoBehaviour 'MASFlightComputer' on game object 'wbiBuffaloCommandPod'.
See "Script Serialization" page in the Unity Manual for further details.
UnityEngine.GameObject..ctor () (at <12e76cd50cc64cf19e759e981cb725af>:0)
AvionicsSystems.MASFlightComputer..ctor () (at <177a2c548c7640c9bc351c4169da46e0>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.GameObject:AddComponent(Type)
Part:AddModule(String, Boolean)
Part:AddModule(ConfigNode, Boolean)
PartLoader:ParsePart(UrlConfig, ConfigNode)
d__56:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

@MOARdV MOARdV merged commit 16e4e7b into MOARdV:master Aug 6, 2022
@MOARdV MOARdV self-assigned this Aug 6, 2022
@MOARdV MOARdV added this to the v1.3.4 milestone Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants