Multiplatform Runtime Level Editor Documentation

If you have any questions or you cannot find any help for your problem in this documentation then please write a post in the following unity forum thread: Unity Forum: Multiplatform Runtime Level Editor. Please do the same also if you have any feedback or improvement suggestion to this documentation.

Introduction

Tutorials & How To's

Save & Load / Serialization Terrain Editor Object Editor Level Editor Extensions / Additional Buttons / Custom UI

Troubleshooting

ERROR:
Error in console when clicking on 'Render Missing Icons' in an object map ("Failed to generate preview for object prefab '[XY]' at index '[Z]'!")
SOLUTION:
Click again


ERROR:
Level icon preview rendering does not work properly on Windows 8.1 and Windows Phone 8.1 when the resolution is not set to native.
SOLUTION:
This is a Unity bug that is easy to solve.
1. Open the "LE_GUIWindowRight.LevelTab.cs" file.
2. Search for "Level Icon Preview Bug"
3. Follow the instructions in the comments.


ERROR:
Level icon preview rendering does not work properly in Unity Editor (seen in Unity 5.2.2).
SOLUTION:
This is a Unity bug, that happens only in the editor and not in the build. This bug occurs only if you have (gray) borders in your game view in the Editor. If you need to render your level icons in the editor, then simply set the aspect ration to 'Free Aspect' in the game window. This bug is reported to be fixed in Unity 5.2.2, therefore if you have problems with it consider using a newer Unity version.


ERROR:
Code does not compile. With errors like:
"error CS0246: The type or namespace name `LE_LevelEditorMain' could not be found. Are you missing a using directive or an assembly reference?"
SOLUTION:
To avoid conflicts with your code all level editor classes have their own namespace. Add all namespaces by placing these lines at the top of your code file: using LE_LevelEditor;
using LE_LevelEditor.Core;
using LE_LevelEditor.Events;
using LE_LevelEditor.Example;
using LE_LevelEditor.LEInput;
using LE_LevelEditor.Logic;"
using LE_LevelEditor.UI;


ERROR:
Unity console shows errors when project/scene is opened. "IsFinite(outDistanceAlongView) UnityEditor.DockArea:OnGUI()"
SOLUTION:
You are facing the Unity Engine bug which sets RectTransform values to NaN.
Unity Forum
Unity Issue Tracker
The MR Level Editor has a built in fix for this bug ('uMyGUI_ScrollbarHandleUnityFix'). The fix will be applied in the Awake function, therefore you should have no problems at runtime. However, if you feel annoyed by the errors, then you have to find the RectTrasnform with the NaN values and click on the 'FIX' button in the inspector of the uMyGUI_ScrollbarHandleUnityFix script, which is attached to all objects that are affected by this bug.

ERROR:
Saving works, but cannot load levels, because the level file is not found.
SOLUTION:
I was not able to reproduce this, but it was reported. Maybe it happens on certain OS configurations. If you encounter this bug open the ExampleGame_LoadSave.cs file. The script is very easy and consists of only 75 lines. The line
WWW www = new WWW("file://" + Application.persistentDataPath + "/level.txt");
tells where the system has to search for the level file. Since this is an example anyway and you will probably want to change it, try to use "Application.dataPath" instead of "Application.persistentDataPath" it solved the problem for the bug reporter.
Thanks for reporting this issue to Prophet (working on Martial Law)

ERROR:
Only in v1.01: Error in console when creating a terrain ("A game object can only be in one layer. The layer needs to be in the range [0...31]").
Since v1.10: you do not need to change anything in your project. However, you will see a warning with instructions as long as you have no "Terrain" layer added. I will keep this warning to make sure that the terrain is not placed in any of your layers that have a special handling. If you do not use layers at all you can safely ignore these warnings. SOLUTION:
Add "Terrain" layer to the layer list of your project.