Jump to content

1.3 Changes Not Mentioned in the Notes


Recommended Posts

I've just started to update one mod, and have already come across stuff which isn't mentioned in the notes.

So, I'm starting this thread to let everyone list their findings:

To start:

EditorPartList.Instance is not instantiated when SceneManager.sceneLoaded calls a function.  you need to move your code into a CoRoutine, and wait until EditorPartList.Instance is not null

 

Replace Input.GetKey() with ExtendedInput.GetKey when using extended key codes

Edited by linuxgurugamer
Link to comment
Share on other sites

When implementing IModuleInfo it is now required to also override a redundant method in PartModule.  Some modules seem to use one while other modules use the other.

Example:

        public string GetModuleTitle()
        {
            return "My Module";
        }

        public override string GetModuleDisplayName()
        {
            return GetModuleTitle();
        }

 

Link to comment
Share on other sites

9 hours ago, linuxgurugamer said:

EditorPartList.Instance is not instantiated when SceneManager.sceneLoaded calls a function.  you need to move your code into a CoRoutine, and wait until EditorPartList.Instance is not null

Just on this one Im feeling a bit dumb. Can confirm that the EditorPartList code had one line added to set a transform, but that's it, no change to orders, etc that I can see. I'd guess that this is simply a timing thing as the Unity sceneLoaded event fires before a lot of stuff is awake/started so it could always have been null in the past too. Or do you mean something else?

Could see about adding a "ready" flag in here too, but it would just be the same as doing a null check really. Anyway, let me know if I missed the point

 

 

1 hour ago, Alshain said:

When implementing IModuleInfo it is now required to also override a redundant method in PartModule.  Some modules seem to use one while other modules use the other...

Put the details on this question back in the other thread here, not redundant (I dont think) but for diffn purposes, maybe need to update our notes to make that clearer: 

 

Link to comment
Share on other sites

1 hour ago, TriggerAu said:

Just on this one Im feeling a bit dumb. Can confirm that the EditorPartList code had one line added to set a transform, but that's it, no change to orders, etc that I can see. I'd guess that this is simply a timing thing as the Unity sceneLoaded event fires before a lot of stuff is awake/started so it could always have been null in the past too. Or do you mean something else?

Could see about adding a "ready" flag in here too, but it would just be the same as doing a null check really. Anyway, let me know if I missed the point

Maybe it's a timing thing.  I just remembered that I replaced the depreciated onLevelWasLoaded with what Unity recommended, maybe that's the difference.

Anyway, no need for a flag, I already fixed it with a coroutine.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...