Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Multiplatform Runtime Level Editor

Discussion in 'Assets and Asset Store' started by FreebordMAD, Jun 10, 2014.

  1. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    52
    In the example if you already have a level loaded. How do you set up a "New" button, that will blank out the level and let you pick a new terrain from scratch?

    I have this so far, but if I use ResetToDefaultOrDestoryTerrain() and then use the Create Terrain button supplied in the example, it gives an error.

    Code (CSharp):
    1. LE_LogicLevel.cs
    2. public void destroyLevel()
    3.         {
    4.             Vector3 removedOffset = new Vector3(99999f, -99999f, 99999f);
    5.             LE_Object[] objs = Object.FindObjectsOfType<LE_Object>();
    6.             for (int i = 0; i < objs.Length; i++)
    7.             {
    8.                 objs[i].transform.position += removedOffset;
    9.                 Object.Destroy(objs[i].gameObject);
    10.             }
    11.             //m_GUI3dTerrain.ResetToDefaultOrDestroyTerrain();
    12.         }
     
    Last edited: Feb 18, 2020
  2. Scourge

    Scourge

    Joined:
    Jan 2, 2013
    Posts:
    8
    Hello,

    ok cool, thanks! it's no hurry, take your time :) ! I have read that 2019.3 is causing trouble for many assets, and it's probably subject to change all the time...
    I'm using 2019.2 and it's totally fine for now!

    Also, a question in the mean time:
    I am trying to figure out how to save component properties of objects placed using the runtime level editor, and even add components to them, and be able to persist the changes to the save file.
    So for example, an prefab object may have a script component that has public variable a with some default value. I would like to change the value of "a" variable after putting the object into the runtime scene, then save the level, and afterwards loading the level again and the object's script component would have the modified variable value.

    Is this possible at all with the Multiplatform RTE?

    I noticed that we can change the color of an object and have that information saved into the save file.

    I feel like I have to implement something by myself, but if you can give some tips, I would so much appreciate it.

    Thank you for your time and effort :)

    Viet
     
  3. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    The easiest way would be just to reload the scene is that an option for you?


    Check this article::http://www.freebord-game.com/index....time-level-editor/documentation/add-meta-data
    You can save a string representation of your "a" variable while the level is being saved and the restore it as you need it while loading. In the UI just add your custom UI above the color sliders, then check in an update function if the selected level object has your custom script attached having the "a" variable. Your UI should update the "a" value once visible. To see what currently is selected just use LE_EventInterface.OnObjectSelectedInScene.
    Don't hesitate to revert if I need to go into more details.

    I will check the 2019.3 version now.
     
  4. Scourge

    Scourge

    Joined:
    Jan 2, 2013
    Posts:
    8
    Wow thanks for the detailed reply!
    Ok, that seems very convenient. A follow-up question, is that can I use this method for any variable type, like classes, enums, or is it only limited to "primitive" types like string, int, float etc...? Since we are saving a string representation, I assume this is not possible, and I'll probably have to rely on something like EasySave right?
     
  5. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    52
    I can load over the old level.

    Is there a way I can set the elevation of the terrain when creating it?
     
  6. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    Yes, you need to serialize your data to string and could use any tool your like for that.

    There is currently no built in terrain elevation setup in the MRLE. Check the class LE_TerrainManager for reference, you could add a new function there.
     
  7. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,062
    Hi, is there any plans to support mod.io?
     
  8. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    Hi there, what exactly would the idea behind it be? Mod.io is more or less the same as Steam Workshop a folder synchronization/management system.
    There currently no plans to allow loading prefabs from folders if this is what you mean.
     
  9. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,062
    I was just thinking of a package like the steam workshop package, so we can use Mod.io instead to share our levels.
     
  10. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,062
    Any chance you can fix these issues for 2019.3 users? Thanks
     
  11. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    This is not yet on the todo list.

    This is on the todo list, but actually I need to fully redesign the controller system of the example dungeon game, which will take a while. I assume you still have your system - just delete the example dungeon scenes and scripts, then it will compile in 2019.3.
     
    derkoi likes this.
  12. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    52
    Can I add the same textures to RightMenu_TerrainEdit_Texture as RightMenu_TerrainCreate_Texture at runtime, instead of adding them individually each time?

    Also, is there a reason for the limit of 5 paint textures?
     
    Last edited: May 1, 2020
  13. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    Hey there, I'm not sure what you are trying maybe you could post some screenshots. Usually, you would not edit any UI elements for the texture editing, but instead add all textures to the terrain texture config, see doc below.
    http://www.freebord-game.com/index....e-level-editor/documentation/terrain-textures

    You can select the max number of textures to be used here:
    upload_2020-5-9_16-40-27.png

    Don't hesitate to revert if something is unlcear and sorry for the late reply.
     
  14. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    52
    Sorry for not checking the documentation, it answered the questions I had.
     
    FreebordMAD likes this.
  15. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    58
    Hello,

    I am thinking of buying this asset and I wanted to know when it will be updated to Unity 2019.3.1?
     
  16. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    I'm sorry to say, but unfortunately I don't have any spare time to fix this at the moment. The only known issue is the example screen controller for mobile being not compatible with the 2019 Unity releases. Hence, you could try out and remove it. If it doesn't work then simply request a refund within 10 days.
     
  17. visualjump3d

    visualjump3d

    Joined:
    Jun 6, 2014
    Posts:
    9
    PLEASE updated to Unity 2019.3.1 ...... :(
     
  18. MJDevsGames

    MJDevsGames

    Joined:
    Jan 9, 2019
    Posts:
    38
    Hi @FreebordMAD !

    I've been using the MRLE for the past year: Absolutely an amazing tool in every regard, it's been super helpful!

    I have a question about a problem Note, I've heavily modded the MRLE in my game, so that may be the source of some of my issues.

    My question is this- Does the MRLE let me have more than 4 textures in my terrains?

    I thought I remembered testing it a while back, and I could have more than 4 textures on the same terrain in the MRLE. And your post above makes it sound like you can have an amount above 5 textures. I just wanted to confirm with you- the MRLE should be possible to use 6+ splat prototype textures, right?

    When I try to add a 5th or higher, the painted area for that new texture is pitch black and has no texture. Can't the MRLE normally support more than 5 textures? Is there any sort of "Hard Limit" on the number of splat prototypes I can use with the MRLE?

    It may be an issue in my added code; I just want to make sure the MRLE doesn't have a hard limit of 4 splat prototype textures before I do!

    And as a far shot, any idea why using a splat prototype texture in slot 5+ is always pitch black for me?

    Thanks!!
     
  19. MJDevsGames

    MJDevsGames

    Joined:
    Jan 9, 2019
    Posts:
    38
    Actually, never mind, I fixed it!!

    Turns out my issue was something totally unrelated to the MRLE; I had been playing with an experimental shader a while back, which looks identical to the normal shader. It was messing with textures in slot 5+... but I fixed it!

    The MRLE is a great tool, everyone who reads this and doesn't have it should get it ^^
     
    FreebordMAD likes this.
  20. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,062
    Anyone got this working with a controller? I'd like to include it in my console games. I thought about controlling the mouse with a controller but apparently that's not possible.
     
    cezarscarlatescu94 likes this.
  21. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    I think controlling the mouse is not the usual way, for consoles usually you would modify what ever is in the center of the screen and when you move the camera the main actions still happen in the middle of the screen, see for example how building in Tropico 6 works on consoles, just a random playtest::


    General Announcement
    Hi everybody, I'm sorry to say but in the current worldwide and my private situation I struggle to find time to provide support. None of my projects is discontinued and I will upgrade all of my projects to the newest Unity version. I assume that the support issue will continue till around Christmas, then it pretty much depends on corona or kindergartens being open/closed. I'm very sorry for the inconvenience this causes at the moment.
     
    Fibonaccov and Bioman75 like this.
  22. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    52
    Thanks for the update, but it runs fine on 2019 for me after commenting out a few lines.
     
    FreebordMAD likes this.
  23. kendo353

    kendo353

    Joined:
    Feb 18, 2018
    Posts:
    2
    Please take pity on a noob.




    error:

    S_SnapToObject: CreatePrefabPreview: could not find prefab in resources at ''!
    UnityEngine.Debug:LogError(Object)
    S_SnapTools.S_SnapToObject:CreatePrefabPreview(S_SnapToObjectPrefab) (at Assets/LapinerTools/SnapTools/S_SnapToObject.cs:395)
    S_SnapTools.S_SnapToObject:OpenSelection() (at Assets/LapinerTools/SnapTools/S_SnapToObject.cs:177)
    S_SnapTools.S_SnapToObject:OnClicked() (at Assets/LapinerTools/SnapTools/S_SnapToObject.cs:331)
    MyUtility.UtilityClickTouchDetector:RaycastCursor(Vector3, ECursorState) (at Assets/LapinerTools/Utilities/UtilityClickTouchDetector.cs:121)
    MyUtility.UtilityClickTouchDetector:Update() (at Assets/LapinerTools/Utilities/UtilityClickTouchDetector.cs:61)


    I guess this is because the "resource path" box on my rail object's snap point is empty.

    any advice appreciated.
    thankyou.
     
  24. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    I'm very sorry for the late reply! I hope you have figured it out yourself already - otherwise you need to set the resource path yourself. Just write there what should be snapped when you click the snap button while in play mode.
     
  25. kordee

    kordee

    Joined:
    Nov 28, 2019
    Posts:
    3
    Hi
    i am new user ,i can't not use this asset on unty 2019 and 2020 it show error on import project , how to fix it?

    Assets\LapinerTools\LevelEditor\Example\Scripts\InputAndCamera\Joystick.cs(4,26): error CS0619: 'GUITexture' is obsolete: 'GUITexture has been removed. Use UI.Image instead.'

    Assets\LapinerTools\LevelEditor\Example\Scripts\InputAndCamera\Joystick.cs(29,10): error CS0619: 'GUITexture' is obsolete: 'GUITexture has been removed. Use UI.Image instead.'

    Component GUI Layer in UI Camera for Scene Assets/LapinerTools/LevelEditor/Example/Scenes/LE_ExampleDungeonEditorGame.unity is no longer available.
    It will be removed after you edit this GameObject and save the Scene.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Component GUI Texture in LeftJoystick for Scene Assets/LapinerTools/LevelEditor/Example/Scenes/LE_ExampleDungeonEditorGame.unity is no longer available.
    It will be removed after you edit this GameObject and save the Scene.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Component GUI Layer in Camera for Scene Assets/LapinerTools/LevelEditor/Example/Scenes/LE_ExampleDungeonEditorGame.unity is no longer available.
    It will be removed after you edit this GameObject and save the Scene.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Component GUI Texture in RightJoystick for Scene Assets/LapinerTools/LevelEditor/Example/Scenes/LE_ExampleDungeonEditorGame.unity is no longer available.
    It will be removed after you edit this GameObject and save the Scene.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  26. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    I'm sorry this is on my todo list. The problem are the mobile controls. So if you don't need it, then you could just comment out the classes with the errors.

    Feel free to request a refund if it stops you from working with it.
     
  27. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    @kordee , @Scourge sorry for taking almost a year... now support starts to roll again. I have just uploaded a version that should be compatible with 2019.3 and upwards till 2020.2
    [Edit]: version was approved and is available now
     
    Last edited: Jan 4, 2021
  28. orville_redenbacher

    orville_redenbacher

    Joined:
    Sep 9, 2018
    Posts:
    12
    Love the asset! How would I go about adding objects to a level that have Monobehavior components without having the Awake/Start/Update functions run until the level is played? For instance, I have a GameManager object that needs to be present in my level to take care of spawning enemies, but when I add an LE_Object script to it and drag it in, the Awake and Start functions run right away. I hope this makes sense!
     
    FreebordMAD likes this.
  29. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    553
    Thanks for using the MRLE and I'm very glad to hear that you love it!
    Best way to do this is using placeholder objects like the player spawn position. The player capsule that you place in the editor is just a mesh without any scripts exept LE_Object. When the game starts, then the example game scripts searches for the player placeholder by name just after the level data is loaded. Once found the placeholder is destroyed and the real player object with camera and scripts already existing in the game scene is moved at the position of the placeholder.
     
    orville_redenbacher likes this.
  30. orville_redenbacher

    orville_redenbacher

    Joined:
    Sep 9, 2018
    Posts:
    12
    Thanks for the quick reply! This sounds a lot easier than what I had expected. :D
     
    FreebordMAD likes this.
unityunity