Jump to content

Search the Community

Showing results for tags 'ongui'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Welcome Aboard
  • Kerbal Space Program 1
    • KSP1 Discussion
    • KSP1 Suggestions & Development Discussion
    • KSP1 Challenges & Mission ideas
    • KSP1 The Spacecraft Exchange
    • KSP1 Mission Reports
    • KSP1 Gameplay and Technical Support
    • KSP1 Mods
    • KSP1 Expansions
  • Kerbal Space Program 2
    • KSP2 Dev Updates
    • KSP2 Discussion
    • KSP2 Suggestions and Development Discussion
    • Challenges & Mission Ideas
    • The KSP2 Spacecraft Exchange
    • Mission Reports
    • KSP2 Prelaunch Archive
  • Kerbal Space Program 2 Gameplay & Technical Support
    • KSP2 Gameplay Questions and Tutorials
    • KSP2 Technical Support (PC, unmodded installs)
    • KSP2 Technical Support (PC, modded installs)
  • Kerbal Space Program 2 Mods
    • KSP2 Mod Discussions
    • KSP2 Mod Releases
    • KSP2 Mod Development
  • Community
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
    • KSP Fan Works
  • International
    • International

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


About me


Location


Interests

Found 1 result

  1. Alright, with KSP 1.1 disabling the RenderingManager access, I'm trying to move my windows to OnGUI and running into an issue. How do I hook OnGUI from any old class in my project? That means a class that's not tagged with KSPAddon or anything similar. One thing the Unity documentation did tell me is that OnGUI only works in a class that inherits MonoBehavoir and that is enabled. So, here's the code giving me issues: ourWin = new MainGUIWindow(EditorLogic.SortedShipList, winTop, winLeft); ourWin.enabled = true; //new line added in KSP 1.1 In KSP 1.0.5, the main MainGUIWindow class did not inherit anything and hooked into RenderingManager in it's constructor method, this worked great. In KSP 1.1, I changed MainGUIWindow to inherit from MonoBehavior, changed my RenderingManager method to OnGUI() and added the second line in the code snippet above to enable the class so the OnGUI() method gets called. However, the ourWin.enabled line is now throwing a NullRef error and I am now stumped. So, how do I convert the MainGUIWindow class to a MonoBehavior class so I can have it call OnGUI the same way a class tagged KSPAddOn does? D
×
×
  • Create New...