@HellFireKoder I have rebuilt the mod using Unity 5.3.6, sadly the result is more of the same. Exact same errors appeared. Is making the mod on a Mac the cause of this or something?
@HellFireKoder I tried pasting the codes into new modifier scripts, unfortunately the problem still persists. I believe it has something to do with the following errors in the Unity console:
.
.
InvalidOperationException: Operation is not valid due to the current state of the object
System.Collections.Stack.Peek () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections/Stack.cs:321)
UnityEngine.GUILayoutUtility.EndLayoutGroup ()
UnityEngine.GUILayout.EndHorizontal ()
UnityEditor.EditorGUILayout.EndHorizontal () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6754)
Jundroo.SimplePlanes.ModTools.Editor.PartEditor.ShowInitializedGUI (Jundroo.SimplePlanes.ModTools.Parts.Part part)
Jundroo.SimplePlanes.ModTools.Editor.PartEditor.OnInspectorGUI ()
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1231)
UnityEditor.DockArea:OnGUI()
.
.
InvalidOperationException: Operation is not valid due to the current state of the object
System.Collections.Stack.Pop () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections/Stack.cs:329)
UnityEngine.GUILayoutUtility.EndLayoutGroup ()
UnityEngine.GUILayout.EndVertical ()
UnityEditor.EditorGUILayout.EndVertical () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6820)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1244)
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1028)
UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:352)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
.
.
They appear everytime I create a new set of the 3 part modifier scripts. How should I approach this?
@HellFireKoder I've reworked everything from the ground up, and the weapon is question is in its own seperate mod now. However, I get the following error in the Dev Console:
.
.
Modifier 'PrototypeMod_LaserCannon' defined in mod 'Prototype Mod' could not be loaded because the modifier type 'LaserCannon, PrototypeMod-Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' could not be found.
.
.
I didn't use a GetComponent to call in the laser's script, but rather attached it to a separate game object and wrote in the Part Behaviour script to load said object and parent it into the Wing Gun clone when not in the designer.
@HellFireKoder I have made a script in Unity in a separate project which enables an object to use a Line Renderer to fire a laser beam. It worked great, being able to fire at different ranges, having an animated texture, emit sparks, etc. In it, an IEnumerator is used to manage the laser beam itself.
I tried to put the script in a custom part modifier script attached to a clone of the Wing Gun. I then noticed that it wasn't going to work because it didn't have the "using System.Collections" line at the top, so I added it. When the mod was run ingame, the part itself didn't even show in the list and actually caused errors in the Dev Console and "blocked" other custom parts to load from the same mod. This was proven when I removed the laser gun, everything else in said mod worked perfectly.
So can I actually run a normal C# script in SP without it being a Part Modifier Script, or maybe adding "using System.Collections" was a mistake?
@mushr0om Thank you, I'll definetely fix this. To everyone else, thank you for enjoying it.
ANDROID VERSION IS IN THE WORKS, I'll try to get it ready ASAP
@helilover03 Hang on, I'll work on it. May take a while
@Faded I don't really have experience with android, and I don't have an android device which makes testing a lot more difficult :/
But I'll look into it
@jamesPLANESii Thank you :D
@Tully2001 Alright, thank you.
@Tully2001 I can't seem to find/open them. Can you give me the process/steps please?
The missing texture problem seems to happen on all mods when applied on Mac. It also happened to me with Gestour's Volcano Mod.
@Aerobako Yes I can confirm, I have the same problem on Mac.
@AndrewGarrison Torpedo was cancelled? :(
@HellFireKoder I understand. I'll look further into this myself, and thank you so much for all your help!
@HellFireKoder I have rebuilt the mod using Unity 5.3.6, sadly the result is more of the same. Exact same errors appeared. Is making the mod on a Mac the cause of this or something?
@HellFireKoder Alright thank you, this might take a while as I'm nowhere near my home. I'll message again once I get it up and running.
@HellFireKoder I'm currently using 5.3.1f1
I should probably update right?
@HellFireKoder I tried pasting the codes into new modifier scripts, unfortunately the problem still persists. I believe it has something to do with the following errors in the Unity console:
.
.
InvalidOperationException: Operation is not valid due to the current state of the object
System.Collections.Stack.Peek () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections/Stack.cs:321)
UnityEngine.GUILayoutUtility.EndLayoutGroup ()
UnityEngine.GUILayout.EndHorizontal ()
UnityEditor.EditorGUILayout.EndHorizontal () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6754)
Jundroo.SimplePlanes.ModTools.Editor.PartEditor.ShowInitializedGUI (Jundroo.SimplePlanes.ModTools.Parts.Part part)
Jundroo.SimplePlanes.ModTools.Editor.PartEditor.OnInspectorGUI ()
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1231)
UnityEditor.DockArea:OnGUI()
.
.
InvalidOperationException: Operation is not valid due to the current state of the object
System.Collections.Stack.Pop () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections/Stack.cs:329)
UnityEngine.GUILayoutUtility.EndLayoutGroup ()
UnityEngine.GUILayout.EndVertical ()
UnityEditor.EditorGUILayout.EndVertical () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:6820)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1244)
UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1028)
UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:352)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
.
.
They appear everytime I create a new set of the 3 part modifier scripts. How should I approach this?
@HellFireKoder I've reworked everything from the ground up, and the weapon is question is in its own seperate mod now. However, I get the following error in the Dev Console:
.
.
Modifier 'PrototypeMod_LaserCannon' defined in mod 'Prototype Mod' could not be loaded because the modifier type 'LaserCannon, PrototypeMod-Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' could not be found.
.
.
I didn't use a GetComponent to call in the laser's script, but rather attached it to a separate game object and wrote in the Part Behaviour script to load said object and parent it into the Wing Gun clone when not in the designer.
@HellFireKoder I have made a script in Unity in a separate project which enables an object to use a Line Renderer to fire a laser beam. It worked great, being able to fire at different ranges, having an animated texture, emit sparks, etc. In it, an IEnumerator is used to manage the laser beam itself.
I tried to put the script in a custom part modifier script attached to a clone of the Wing Gun. I then noticed that it wasn't going to work because it didn't have the "using System.Collections" line at the top, so I added it. When the mod was run ingame, the part itself didn't even show in the list and actually caused errors in the Dev Console and "blocked" other custom parts to load from the same mod. This was proven when I removed the laser gun, everything else in said mod worked perfectly.
So can I actually run a normal C# script in SP without it being a Part Modifier Script, or maybe adding "using System.Collections" was a mistake?