stupid_chris Posted March 30, 2016 Share Posted March 30, 2016 Yeah. Cause those are config edits. Link to comment Share on other sites More sharing options...
Papa_Joe Posted March 30, 2016 Share Posted March 30, 2016 Thanks so much for this. This will save soooo much time in discovery. Link to comment Share on other sites More sharing options...
FreeThinker Posted March 30, 2016 Share Posted March 30, 2016 Question, the KSP class ConfigNode is suddenly inaccesable, what replaced it? Also what replace the partmodule methods " public ConfigNode OnSave(ConfigNode node)" and "public void OnLoad(ConfigNode node)" ? Link to comment Share on other sites More sharing options...
Angelo Kerman Posted March 30, 2016 Share Posted March 30, 2016 4 minutes ago, FreeThinker said: Question, the KSP class ConfigNode is suddenly inaccesable, what replaced it? Also what replace the partmodule methods " public ConfigNode OnSave(ConfigNode node)" and "public void OnLoad(ConfigNode node)" ? Add a reference to KSPUtil.dll. Check the first post it goves you clues on what you need to include. Link to comment Share on other sites More sharing options...
malkuth Posted March 30, 2016 Share Posted March 30, 2016 9 minutes ago, FreeThinker said: Question, the KSP class ConfigNode is suddenly inaccesable, what replaced it? Also what replace the partmodule methods " public ConfigNode OnSave(ConfigNode node)" and "public void OnLoad(ConfigNode node)" ? like post above stated for KSPUTIL.dll pretty much all my issues I had in the building of new versions were because almost everything has been moved to other areas. A lot of stuff IE most still work the same you just have to get the refrences like the first post stated. And I had a huge list, but once reading first post and adding the refrences.. Everything pretty much cleaned up, other than a few things. Link to comment Share on other sites More sharing options...
FreeThinker Posted March 30, 2016 Share Posted March 30, 2016 (edited) 10 minutes ago, Angel-125 said: Add a reference to KSPUtil.dll. Check the first post it goves you clues on what you need to include. Thanks But another issue remains, the class Gameobject has suddenly lost the property "renderer" . I need it in order to get access to the "material" property Edited March 30, 2016 by FreeThinker Link to comment Share on other sites More sharing options...
DMagic Posted March 30, 2016 Share Posted March 30, 2016 To add to my previous point about hiding the UI, this seems to handle all of the cases where you want to hide something. void Start() { GameEvents.onShowUI.Add(UIOn); GameEvents.onHideUI.Add(UIOff); GameEvents.onGUIMissionControlSpawn.Add(UIOff); GameEvents.onGUIMissionControlDespawn.Add(UIOff); GameEvents.onGUIRnDComplexSpawn.Add(UIOff); GameEvents.onGUIRnDComplexDespawn.Add(UIOn); GameEvents.onGUIAdministrationFacilitySpawn.Add(UIOff); GameEvents.onGUIAdministrationFacilityDespawn.Add(UIOn); GameEvents.onGUIAstronautComplexSpawn.Add(UIOff); GameEvents.onGUIAstronautComplexDespawn.Add(UIOn); } void OnDestroy() { GameEvents.onShowUI.Remove(UIOn); GameEvents.onHideUI.Remove(UIOff); GameEvents.onGUIMissionControlSpawn.Remove(UIOff); GameEvents.onGUIMissionControlDespawn.Remove(UIOff); GameEvents.onGUIRnDComplexSpawn.Remove(UIOff); GameEvents.onGUIRnDComplexDespawn.Remove(UIOn); GameEvents.onGUIAdministrationFacilitySpawn.Remove(UIOff); GameEvents.onGUIAdministrationFacilityDespawn.Remove(UIOn); GameEvents.onGUIAstronautComplexSpawn.Remove(UIOff); GameEvents.onGUIAstronautComplexDespawn.Remove(UIOn); } private void UIOn() { showUI = true; } private void UIOff() { showUI = false; } private void OnGUI() { if (!showUI) return; //GUI stuff... } Just keep in mind that you'll probably want two flags to check if your UI should be visible. One for the events shown above, and a second standard flag for hiding or closing your UI through other means. Link to comment Share on other sites More sharing options...
JPLRepo Posted March 30, 2016 Share Posted March 30, 2016 (edited) 3 minutes ago, FreeThinker said: Thanks But another issue remains, the class Gameobject has suddenly lost the property "renderer" . I need it in order to get access to the "material" property transform.renderer is now transform.GetComponent<renderer>() transform.material is now transform.GetComponent<material>() or use the cached version... as per the OP Edited March 30, 2016 by JPLRepo Link to comment Share on other sites More sharing options...
FreeThinker Posted March 30, 2016 Share Posted March 30, 2016 1 minute ago, JPLRepo said: transform.renderer is now transform.GetComponent<renderer>() or use the cached version... as per the OP Thanks, I guess you ment " transform .GetComponent<Renderer>().material" Link to comment Share on other sites More sharing options...
Ziw Posted March 30, 2016 Share Posted March 30, 2016 Amazing how people don't read the OP. @sarbian take a look here on my humble attempts at creating an window abstration. And this is an example of use. It worked fine in my separate U5 project, but I did not have much time to tinker with it. Feel free to use any part of the code if you want to start a proper library. Link to comment Share on other sites More sharing options...
JPLRepo Posted March 30, 2016 Share Posted March 30, 2016 7 minutes ago, FreeThinker said: Thanks, I guess you ment " transform .GetComponent<Renderer>().material" For the material. Yeah. Link to comment Share on other sites More sharing options...
sarbian Posted March 30, 2016 Author Share Posted March 30, 2016 15 minutes ago, Ziw said: Amazing how people don't read the OP. @sarbian take a look here on my humble attempts at creating an window abstration. And this is an example of use. It worked fine in my separate U5 project, but I did not have much time to tinker with it. Feel free to use any part of the code if you want to start a proper library. Amazing. I ll have a look. Thanks Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 30, 2016 Share Posted March 30, 2016 (edited) 2 hours ago, linuxgurugamer said: This works in 1.0.5: using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; using System.Reflection; using System.Runtime.InteropServices; Object obj = EditorLogic.fetch; string name = "\u0001"; var f = obj.GetType().GetField(name, BindingFlags.Public | bindingFlags.NonPublic | BindingFlags.Instance); But returns null in 1.1 Anybody have any ideas what's not working? What I need is access to the KerbalFSM. If there is a better way to do this, I'd appreciate hearing about it. Specifically, I need to do the following: (editorFSM.currentStateName == "st_offset_tweak" || editorFSM.currentStateName == "st_rotate_tweak")) and the following: editorFSM.lastEventName.Equals("on_rootSelect"); Thanks in advance Edited March 30, 2016 by linuxgurugamer Link to comment Share on other sites More sharing options...
FreeThinker Posted March 30, 2016 Share Posted March 30, 2016 I used to be able to call "ScaledSpace.Instance.scaledSpaceTransforms" but not anymore, where did scaledSpaceTransforms go? Link to comment Share on other sites More sharing options...
Ziw Posted March 30, 2016 Share Posted March 30, 2016 2 minutes ago, FreeThinker said: I used to be able to call "ScaledSpace.Instance.scaledSpaceTransforms" but not anymore, where did scaledSpaceTransforms go? Please, read the thread.... This exact question was answered on the previous page by Thomas P Link to comment Share on other sites More sharing options...
FreeThinker Posted March 30, 2016 Share Posted March 30, 2016 (edited) AudioSource class is suddenly missing the propery panLevel, is panStereo it's alternative? Edited March 30, 2016 by FreeThinker Link to comment Share on other sites More sharing options...
JPLRepo Posted March 30, 2016 Share Posted March 30, 2016 1 minute ago, FreeThinker said: AudioSource class is suddenly missing the propery panLevel, is panStereo it's alternative? That's what I assumed. Seems to work. Link to comment Share on other sites More sharing options...
Padishar Posted March 30, 2016 Share Posted March 30, 2016 (edited) 1 hour ago, linuxgurugamer said: What I need is access to the KerbalFSM. If there is a better way to do this, I'd appreciate hearing about it. Specifically, I need to do the following: (editorFSM.currentStateName == "st_offset_tweak" || editorFSM.currentStateName == "st_rotate_tweak")) and the following: editorFSM.lastEventName.Equals("on_rootSelect"); Thanks in advance There has been a change to the stock root select functionality which may make trying to get this working not really important anymore. What is the code actually trying to do? Edited March 30, 2016 by Padishar Link to comment Share on other sites More sharing options...
FreeThinker Posted March 30, 2016 Share Posted March 30, 2016 What about ExperimentsResultDialog, where did it go? Link to comment Share on other sites More sharing options...
DMagic Posted March 30, 2016 Share Posted March 30, 2016 @FreeThinker It's in KSP.UI.Screens.Flight.Dialogs. The ExperimentResultDialogPage constructor requires a ScienceLabSearch object (with a Vessel and ScienceData object), but otherwise seem to function the same as before. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 30, 2016 Share Posted March 30, 2016 52 minutes ago, Padishar said: There has been a change to the stock root select functionality which may make trying to get this working not really important anymore. What is the code actually trying to do? First off, Squad is adding a function so I won't need to use reflection to get a hidden value anymore. I have two mods which use this: WasdEditorCameraRedux and EditorExtensionsRedux. They use it in different ways, but essentially to avoid conflicting with what the editor itself is doing. Link to comment Share on other sites More sharing options...
JPLRepo Posted March 30, 2016 Share Posted March 30, 2016 13 minutes ago, DMagic said: @FreeThinker It's in KSP.UI.Screens.Flight.Dialogs. The ExperimentResultDialogPage constructor requires a ScienceLabSearch object (with a Vessel and ScienceData object), but otherwise seem to function the same as before. Yes added one, but has anyone worked out yet how this ScienceLabSearch object works or functions? Link to comment Share on other sites More sharing options...
DMagic Posted March 30, 2016 Share Posted March 30, 2016 @JPLRepo Looking at the fields in the ScienceLabSearch class I'm guessing it just builds a list of all the science labs on the current vessel that: 1; are manned, 2; have space, 3; haven't processed that data, 4; aren't currently processing anything. Then just sends your data to the next valid lab when you click on the lab process button. Link to comment Share on other sites More sharing options...
Athlonic Posted March 30, 2016 Share Posted March 30, 2016 2 hours ago, FreeThinker said: AudioSource class is suddenly missing the propery panLevel, is panStereo it's alternative? Hi, I replaced panLevel with spatialBlend for Chatterer, it seems to do the trick if you want a 2D audiosource. panStereo seems more like just a left/right balance, I might be wrong though. Link to comment Share on other sites More sharing options...
JPLRepo Posted March 31, 2016 Share Posted March 31, 2016 ScreenMessages.ActiveMessages list is no longer public. Went looking in KSP.UI.* but couldn't find anything that replaces it... Anyone got any ideas? Link to comment Share on other sites More sharing options...
Recommended Posts