Search Unity

  1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Multiplatform Runtime Level Editor

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

  1. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    Good to hear that I could help!

    Have you though about using the variations feature?
    You could do the following:
    1. Set Variation of your player LE_Object to ACTIVE_DEACTIVATE_OBJECTS
    2. Add visual sub objects without scripts to your player (car, plane, human, etc.)
    3. Set those subobjects as variations and remove the capsule
    4. When the scene is loaded, check which of your sub objects is activated, remove the player and load the proper real player with camera
     
  2. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    552
    That's a nice feature! I had not seen that... thanks for pointing it out! :)
     
    FreebordMAD likes this.
  3. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    552
    Can I add more Variation options to LE_Object myself? if so how?
     
  4. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    What exactly do you mean? More variation types then object enable/disable and replace materials?
     
  5. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    552
    For example I am adding a light to scene from my Objevts tree view, and I want to use the colour sliders to change the light colour, not the material. Also have a drop down to change the light type to directional, point or spot, maybe access the light range field via a slider.

    So thinking about being able to access other component parameters, e.g. Variations!
     
  6. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    The MRLE is designed to be super easy to use to allow players that have no developer background to create levels. Hence, I have decided not to expose all the inspector properties to the players. However, I will put light color on the list.
    This can be easily achieved by modifying the LE_Object.ColorProperty set implementation. Just use GetComponentsInChildren<Light>...

    It should be possible to use object enable/disable variation to select light type for light prefabs.

    Is there anything else that you would like to access?
     
    Greg-Bassett likes this.
  7. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    552
    That's great, I just wanted to know how I could access more of the Inspector/Component properties and add my own GUI panels for the different types, such as enum, string, Vector3 etc.
     
  8. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    You coulkd listen to the LE_EventInterface.OnObjectSelectedInScene event. Then show your special UI to modify the properties you need depending on the type of the selected object. To save/load the additional data you could use the meta data feature:
    http://www.freebord-game.com/index....time-level-editor/documentation/add-meta-data
    https://forum.unity3d.com/threads/multiplatform-runtime-level-editor.250920/page-11#post-2956032
     
  9. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    552
    Thanks, that makes total sense as the way to implement my editing of Object properties.

    If I am just changing standard components of my Objects, such as Transform, Mesh Renderer etc, then would those modifications get saved anyway with the scene?
     
  10. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    You can see what is being saved for a single object in the LE_SaveLoad.SaveLE_Object method quoted below. You can add your custom code here. To answer your question Transform will be saved, but changes to the Mesh Renderer will not.
    Code (CSharp):
    1.             // write UID
    2.             p_stream.Write(p_object.UID);
    3.             // write resource path
    4.             p_stream.Write(p_object.name);
    5.             // write transformation
    6.             SaveVector(p_stream, p_object.transform.position);
    7.             SaveQuaternion(p_stream, p_object.transform.rotation);
    8.             SaveVector(p_stream, p_object.transform.localScale);
    9.             // write IsRigidbodySleepingStart property
    10.             p_stream.Write(p_object.IsRigidbodySleepingStart);
    11.             // write color property if there is one
    12.             p_stream.Write(p_object.IsWithColorProperty);
    13.             if (p_object.IsWithColorProperty)
    14.             {
    15.                 SaveColorNoAlpha(p_stream, p_object.ColorProperty);
    16.             }
    17.             // write variation
    18.             p_stream.Write(p_object.VariationsDefaultIndex); // default index contains the currently used index
     
  11. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    18
    Hi Denis, I 've been using MRLE 1.32 for a long time and modified a few codes in MRLE . Now I want to upgrade MRLE to 1.34. Can you tell me the best way to upgrade?
     
  12. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    First of all thanks for using the MRLE!
    You could follow the steps below:
    1. Make a full backup!
    2. Get your project under (at least local) version controls (GIT or SVN)
    3. Update MRLE
    4. Revert you changes back into the project using your version control software
     
  13. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    18
    Thanks for your tips! I spend a few days figuring it out. Now I have upgraded to 1.34 successfully.
     
    FreebordMAD likes this.
  14. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    149
    Hi Denis, is it possible that you implement the new runtime navmesh baking feature into MRLE, so that we can drop navmesh agents in level editor itself.
     
  15. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    Hi, I did just realize that this new feature was added in Unity 5.6.
    How does your current solution work.
    What exactly do your navmesh agents do?
     
  16. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    149
    I need the navmesh agents to pathfind to different waypoints around the created level. Is this already possible without baking the navmesh at runtime?
     
  17. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    As far as I know the (old) Unity NavMesh feature using it in a user generated scenario is(/was) not possible at all. However, it seems that starting from Unity version 5.6 it is possible to create NavMeshes at runtime. You need to give me a clear specification of what you need, then I can tell you if I can add this to MRLE.
     
  18. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    149
    Place characters. The character prefabs already have navmesh agent component with ai component that uses navmesh for pathfinding. Since mrle is copying unity editor, a bake navmesh button is available and we can define which of the prefabs are walkable and which are not (obstacle)
     
  19. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    I just took a look at the new Unity features regarding the runtime NavMesh generation. I have to say that the Unity team provides us with a powerful NavMesh solution. All I would need to do is add examples to the MRLE. There is no need to change any of the MRLE code. I have just released a big patch, so it will take time until this happens... Right now I'm concentrating on my new Asset Store product series called Easy Steamworks Integration.

    What you need to do is:
    1. Add the open source code provided by Unity to your project: https://github.com/Unity-Technologies/NavMeshComponents/tree/master/Assets
    2. Add a NavMeshSurface to your terrain or the ground object
    3. Add a NavMeshModifier script to your obstacles and let it set the NavMesh to not walkable
    4. When the scene is loaded in editor or in the game, then the Unity scripts mentioned above will create the NavMesh for you

    Tell me if you need more details on that
     
    coverpage likes this.
  20. Syberam

    Syberam

    Joined:
    Jul 2, 2017
    Posts:
    23
    Is that for Runtime only? is there any tool like this for editor level design?
     
  21. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    You can use MRLE in the Unity Editor during runtime, then switch to the editor scene and make changes there, then switch back to the runtime scene etc...
    If you are looking for an Unity Editor extension, then you might also want to look at that package:
    https://www.assetstore.unity3d.com/en/#!/content/3558
     
    Last edited: Jul 5, 2017
    Syberam likes this.
  22. Nudge

    Nudge

    Joined:
    Jun 10, 2015
    Posts:
    4
    In the example, the scene used to play a level is missing a canvas which causes unity to hang on my Mac. The way I was able to find this out is looking at the editor.log file and seeing a lot of errors, however the one that stood out was uMyGUI_PopupManager: AddPopup: there is no Canvas in this level! which is at line 160 of the popup manager.

    After adding a canvas to the LE_ExampleGame scene all works, however the loading please wait popup is not being destroyed. Only a couple of warnings related to obsolete method lastSelectedGameObject remain now, otherwise this is fantastic!

    Thanks for the asset, love it!
     
  23. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    Thank you very much for reporting this problem and helping to improve the MRLE! To help me reproduce the problem, please answer the questions below:
    1. Which Unity version do you use?
    2. Have you tested with the LE_ExampleEditor scene?
    3. The canvas should be inside the UI Camera object, see screenshot below. Please confirm that it is missing. upload_2017-8-12_15-42-29.png
    4. Have you combined the MRLE with any other of my packages?
    Please make a screenshot of you Hierarchy window showing the UI Camera object as in the screenshot above and your new canvas object.

    The lastSelectedGameObject was added in the newest Unity version. I will release a patch soon. I'm glad that you like the asset despite having some problems with it. You would help me a lot by posting a review on the Asset Store!
    [EDIT:] THANKS FOR THE ALREADY POSTED REVIEW!
     
    Last edited: Aug 12, 2017 at 2:58 PM
  24. Nudge

    Nudge

    Joined:
    Jun 10, 2015
    Posts:
    4

    1. Unity 5.6.2f1
    2. Yes this is a fresh install of MRLE with no other assets.
    3. The canvas is missing in scene LE_ExampleGame, this causes Unity to hang.


    Steps to reproduce

    1. Create new project
    2. Install MRLE
    3. Open scene LE_ExampleEditor
    4. Run
    5. Create level/save
    6. Play

    Hangs

    After reading the editor.log file for unity, the error is being reported by MRLE that is at line 160 in the popup manager. uMyGUI_PopupManager: AddPopup: there is no Canvas in this level!

    Screen Shot 2017-08-13 at 7.24.35 pm.png

    There is a canvas in LE_ExampleEditor, that's not the issue, the issue is there is no canvas in LE_ExampleGame, this is what cause the error and unity to hang.

    After adding the canvas like so....Unity no longer hangs, however the please wait popup does not got away.

    Screen Shot 2017-08-13 at 7.27.19 pm.png

    Screen Shot 2017-08-13 at 7.29.04 pm.png

    Hope this helps....

    Other than that I have been able to integrate it into my game, so its more an issue with the example rather than the asset :)
     
    FreebordMAD likes this.
  25. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    355
    Thank you so much for reporting this, I'm uploading the patch to the Asset Store right now!
    The problem was that the save/load extension has used the next uMyGUI version, while the editor would still expect the old one. The assets got mixed (internally I have only one project) and it blew off the editor in an endless loop.

    @ALL: I'm sorry for having introduced this bug and apologize for any inconvenience!
    If you need the patch, please send me a mail. It will be available in a week on the Asset Sore.