Search Unity

  1. 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. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    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:
    621
    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:
    621
    Can I add more Variation options to LE_Object myself? if so how?
     
  4. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    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:
    621
    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:
    532
    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:
    621
    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:
    532
    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:
    621
    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:
    532
    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:
    42
    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:
    532
    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:
    42
    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:
    385
    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:
    532
    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:
    385
    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:
    532
    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:
    385
    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:
    532
    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. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    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.
  21. 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!
     
  22. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    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
  23. 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.
  24. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    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.
     
  25. lilcool

    lilcool

    Joined:
    Mar 4, 2010
    Posts:
    2
    Is there support for selecting multiple objects and Cloning them?
    If not, then what is the best way to extend? Can give me some pointer?
     
    HakJak likes this.
  26. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    Sorry for the late reply. This is on the list, but is not possible yet.
    Take a look at LE_GUI3dObject.SelectedObject. What you basically would need to do is make an array out of it and then apply the operations performed for LE_GUI3dObject.SelectedObject to all members of the array. Don't hesitate to ask further questions, which will arise during your rework!
     
  27. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    To disable the built in highlight simply remove the LE_Object.LateUpdate function.

    The currently selected variation is stored in LE_Object.VariationsDefaultIndex
     
    Greg-Bassett and HakJak like this.
  28. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    The data is actually not stored as bytes, but to limit memory usage each command returns the number of bytes it needs. You have calculated it correctly above, just take a look on all members of a command and the nested members of class references, e.g LE_CmdTransformObject.
    LE_CmdObjectLink m_object
    • class reference = 4 bytes
    • int m_objectInstanceUID = 4 bytes
    • LE_Object m_objectInstance
      • class instance reference = 4 bytes
      • we ignore the inner members of LE_Object, since those would exist even without the command
    Vector3 m_deltaPos
    • struct reference = 4 bytes
    • float x = 4 bytes
    • float y = 4 bytes
    • float z = 4 bytes
    Quaternion m_deltaRot
    • struct reference = 4 bytes
    • float x = 4 bytes
    • float y = 4 bytes
    • float z = 4 bytes
    • float w = 4 bytes
    Vector3 m_deltaLocalScale
    • struct reference = 4 bytes
    • float x = 4 bytes
    • float y = 4 bytes
    • float z = 4 bytes
    The LE_CmdTransformObject must have been referenced somewhere
    • 4 bytes
    I get 68 bytes here. The returned GetStoredBytes are not accurate. For small commands I have just entered something quickly, since it is not important if there is one bytes more or less. However, if you take a look at the LE_CmdChangeTerrainHeights command you will understand that it has intense memory usage, here it is important to have the correct amount of memory space being calculated right.

    The LimitMemoryUsage method of the UR_CommandMgr class removes the oldest command when needed.
    Code (CSharp):
    1. private void LimitMemoryUsage()
    2.         {
    3.             while (m_commandsStoredBytes > m_commandsStoredBytesLimit && m_undoCommands.Count > 0)
    4.             {
    5.                 // remove oldest command
    6.                 UR_ICommand oldestCmd = m_undoCommands[0];
    7.                 m_undoCommands.RemoveAt(0);
    8.                 m_commandsStoredBytes -= oldestCmd.GetStoredBytes();
    9.             }
    10.             // in theory the redo list could use a lot storage space, but since the redo list is cleared after every new command, we do not check it here
    11.             // => this means, that reducing the StoredBytesLimit on runtime will not delete the redo stack, it will be deleted when a new command is executed
    12.         }
     
  29. Shredsauce

    Shredsauce

    Joined:
    Apr 4, 2016
    Posts:
    27

    Thank you!
     
    FreebordMAD likes this.
  30. ZouhairSerrar

    ZouhairSerrar

    Joined:
    Oct 17, 2016
    Posts:
    4
    I just purchased this package with its file loading/saving extension and the steam workshop/leaderboard extensions.

    I have some bugs in Unity 2017.2
    • The translate gizmos don't work properly: when you drag the squares that are supposed to move the object on a plane, the object moves slower or faster than the mouse cursor.
    • The "Finger" gizmo resets the horizontal rotation of my object when I move it.
    Documentation requests:
    • I find the documentation rather overwhelming, there should be a step by step guide on how to create an editor scene from scratch. Right now there are no guides and no tutorial videos, which is not really helpful given the complexity of the package.
    • It's incredibly hard to link a custom GUI to the level editor. Maybe a redesign of the UGUI implementation is in order? At least make the inspector a little bit more user friendly.
    • How to use the Save/load File picker? I've created an editor scene from scratch and I have no idea how the file picker works on the example scene.
    Feature requests:
    • Set the X, Y, Z coordinates and the rotation angles of an object like in the Unity property editor.
    • It's hard to have precise placement of objects, for example, it would be nice to snap rotation angles to 45 degrees by holding shift.
    • Grid snapping like in ProCore's Grid Utility extension.
    • A hierarchy view
    • Mesh combining, this would be useful when placing fences or race tracks.
     
    Last edited: Nov 21, 2017
  31. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    Thanks for purchasing the MRLE and all the detailed feedback!

    Could you please make a video?

    This is by design. The advantage is that you can move a house on a hill and it will match the horizontal rotation to the terrain's slope.

    Please try to start the other way around. Select the example scene that matches your needs most, then add the objects of your game. If you import the Save/Load file picker, then a file popup will be shown once you click on save or load automatically.
    Please describe what you are trying to achieve and why you need to redesign the uGUI from scratch instead of changing it step by step.

    This is by design. The MRLE is designed to be used by players without developer experience. Having the coordinates as numbers or a hierarchy view would conflict with the desired simplicity of the MRLE.

    Please take a look at the code line below in the LE_LogicObjects class. If you remove it, then the rotation will be snapped.
    Code (CSharp):
    1. gridSnap.IsSnapAxisXRotation = gridSnap.IsSnapAxisYRotation = gridSnap.IsSnapAxisZRotation = false; // under construction
    The property S_SnapToGrid.RotationStepSize will control the snap angles.

    Could you please describe in more detail what you are missing?
     
  32. ZouhairSerrar

    ZouhairSerrar

    Joined:
    Oct 17, 2016
    Posts:
    4
    I spent a week reading the code and now I understand the tool much better.

    About my request to add the hierarchy and inspector, I managed to code these myself, it was easy since the architecture is built on delegates. However, it would be nice to offer these in the package. From my experience, not all players like simplicity, some are wannabe developers and prefer to have more control over their creations, I myself am coming from the ARMA/Operation flashpoint community, and the editors in ARMA were always built for advanced users. The Arma 3 editor has almost the same features, if not more, as the Unity editor.

    About the lack of documentation: I'm sorry but I don't think anything can justify a lack of a proper step by step tutorial and/or tutorial videos. I've done what you said and followed the examples, but I could clearly see that there is no way for beginners or average coders to use and customize the tool with ease. Almost all established unity packages have numerous video tutorials and detailed written guides, it's crucial for properly using a software package. If you want your addons to rise to the high standards of UFPS, Playmaker, ProBuilder, etc, you have to provide thorough tutorials and documentation. I've read the entirety of the manual but there are still some stuff I could only discover by reading the code.

    For example: the way you implemented the File chooser extension is rather obscure, I had to dig deep to see that a partial class is used, and had to dig even deeper to understand how where and why it was implemented that way. This is not documented in the manual.

    About the grid snapping like in ProGrids: sometimes when designing levels, it's nice to be able to change the snapping parameters in the level editor. Currently, the snapping has to be predefined in the LE_Object, which is a little limiting and counter-intuitive. What if the level designer wanted to move an object freely, then use grid snapping with a 0.5 unit size for accurate positionning?

    The best way to know what I'm talking about is to use ProCore's ProGrid extension.

    About the translate Gizmo: I'm afraid I don't have time to capture and upload a video, but the behavior I'm describing could easily be seen in Guts and Glory, The arrows of the gizmo are working as expected, but the square handles that are supposed to move an object on the XY, XZ, or YZ plane don't properly follow the mouse cursor when dragged (like it's the case in the Unity editor), they accelerate, and sometimes decelerate.

    I have more questions if you don't mind :
    • I don't want the camera to slow down when approaching the terrain, how to disable this behavior?
    • How to replace the keybindings? (I'm using ReWired)
    • How to pan the view like with Unity's hand tool, did I miss it in the docs or is it not implemented yet?
    • How to change the file extension of the saved level files? For example, I want the levels to be saved as MyLevel.level rather than MyLevel.txt
    My feedback may seem negative, but I'm overall happy with my purchase.Here are some positive points :
    • The popup system is brilliantly designed, I'm using it for all my game menus now.
    • The level meta data is incredibly useful for extending the editor without actually changing the code. I've implemented a system similar to the one in ARMA, where you have a static map or island with predefined terrain, water and buildings, and the user is only allowed to add objects on top of it.
    • There is a real separation between the level editor and the game code, it is possible to completely change the interface and only use the level editor's core features. I love it since it's also similar to a very modular package that I adore: UFPS.
    • I can clearly feel that the tool was made for practical purposes, I'm preparing to launch a game on steam and I really like the no bullshit approach of the author. Unlike some authors who are more software engineers than game devs, and who like to build a complete OS on top of Unity rather than go straight to the goal.

    .
     
    FreebordMAD likes this.
  33. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    The MRLE is designed to be open for change. I'm glad it worked for you! You being able to simply add the hierarchy and the inspector shows me that the MRLE is simple to extend and that the event/delegate based concept works.

    I understand that you are missing videos and step by step guides in the documentation. Besides, you are right I should add some more documentation on the file extension. However, I assume that you have already discovered that it would take weeks to recreate the uGUI from scratch. Hence, the only possible solution is to start with one of the demo scenes. Having said that, it should still be mentioned in the documentation.

    Thanks for the hint, I will take a look soon.

    I was not yet able to reproduce this, but I will try to compare it with the Unity Editor.

    In the LE_LevelEditorMain class you will find the code line below. Simply set camDist to a fixed value e.g. 1000.
    Code (CSharp):
    1. float camDist = EstimateDistanceToLevel(EEstimateDistanceMode.AVERAGE);
    Take a look at the LE_InputDeviceKeyboard and LE_InputDeviceMouse classes. You might want to write your own input handler for rewired.
    For some other key combinations please see usage of the LE_LevelEditorMain.ACTIVE_KEY_COMBOS property.

    You do this with the keyboard, see the LE_InputDeviceKeyboard class. On touchscreens you can do this with a 3 finger gesture, see LE_InputDeviceTouchscreen class. You could implement it yourself in the LE_InputDeviceMouse class.

    Take a look at the occurrences of ".txt" in the LE_LevelDatabase_Default class.


    Great! Reading this in an Asset Store review would help me a lot!
     
    Last edited: Nov 28, 2017
  34. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Is there a step by step tutorial on how start from scratch ?
     
  35. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    The best way to get started is to try all the example scenes, then select the scene best matching your game and add the scripts and objects of your game to the example scene.
    This approach is far easier than starting from scratch, since you can start with the example uGUI implementation and step by step adapt it to your game. Please don't hesitate to ask further questions!
     
  36. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    The TT_Terrain9Patch is used to make sure that all borders of a 9 patch terrain stay connected. The ExampleGame_9PatchLevel script calls TT_Terrain9Patch.FixAllBorders(TT_Terrain9Patch.EFixMode.READ_FROM_BORDERS), which basically connects the central terrain with the borders of the 8 terrains surrounding it. If you remove the ExampleGame_9PatchLevel script from the LE_ExampleEditorTerrainOnly scene, then you will see that it is possible to create holes between the central terrain and its neighbors. How did you want to use the TT_Terrain9Patch class?
     
  37. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42
    Actually, I want all borders of a 9 patch terrain to stay connected smoothly.

    Like this.

     
  38. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    This is a complex task. The 9 patch terrain feature of the MRLE affects only the border heights of the terrain patches and not the heights inside the terrain. Could you please describe your plan in more details?

    To create an effect as in your right screenshot you would need to adapt the TT_TerrainHelpers.FixBorders method.
    Currently it will compare the border heights and make them match the neighbor terrain (average or stick to one of the terrains). Your change would be to compare more than just the border heights. Instead, you would compare a two dimensional array of heights where half is coming from terrain A and half from terrain B. The first dimension of the array could be the terrain border length and the second dimension would determine how far the smoothing would go into the terrain. You can take a look at the smoothing logic in the LE_TerrainManager.SmoothHeight method.

    However, it would be easier to just limit the allowed user change in height close to the central terrain's borders.
    For example, you could smooth the border of the central terrain every time LE_EventInterface.OnChangeLevelData is called with change type set to terrain.

    I'm still not sure if I understand why you need to smooth things. Hence, more insight here could help.
     
  39. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42
    Thanks, Denis. Your support is always the best.

    I know it is a complex task. I try to smooth the border of terrain simply because the 9 patch terrain feature scales the terrain texture too much. It's not looking good.

    Maybe you can tell me the other way to avoid this issue?
     
  40. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    By default, there is now way to avoid this issue in the MRLE. My suggestion would be to:
    1. Create a new parameter less method LE_TerrainManager.SmoothBorders
    2. Copy code from LE_TerrainManager.SmoothHeight
    3. For each border get X rows of heights (see GetAffectedAreaInternal) and apply smoothing to it
    4. Call LE_TerrainManager.SmoothBorders just after m_patchGroup.FixAllBorders(TT_Terrain9Patch.EFixMode.READ_FROM_BORDERS); in ExampleGame_9PatchLevel.LateUpdate.
    Please ask for clarification, if you have further questions.
     
  41. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42
    Thanks for your suggestion.The problem is solved now.
     
    FreebordMAD likes this.
  42. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    Great, I'm just curious how did you solve the problem?
     
  43. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42
    I use almost the same logic to create a new SmoothTerrainBorder method and call the method in ExampleGame_9PatchLevel.LateUpdate.
     
    FreebordMAD likes this.
  44. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    Is your work public already? A link?
     
  45. nirvanajie

    nirvanajie

    Joined:
    Jan 7, 2016
    Posts:
    42
    It's still on the way. When it's ready I will tell you. :)
     
    FreebordMAD likes this.
  46. Ultroman

    Ultroman

    Joined:
    Mar 10, 2014
    Posts:
    61
    Is it possible to use this editor without having the terrain at all? We would like to just have a level made from our own prefabs, and freefall if you fall over the edge.

    I realize that we right now place objects relative to the terrain. If the whole editor works like this, would it be possible to replace the terrain with a certain prefab of ours? Like a gameobject with a boxcollider on it, of a certain size. Or just define a ground y value, and place everything according to that.

    The latter would probably be the best, but I haven't bought the asset yet, so I can't inspect the code.
     
  47. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    621
    Hi @Zed2100,

    How did you add a Hierarchy and Inspector? could you share some info and images?


    Thanks!

    Greg
     
    Last edited: Mar 16, 2018
  48. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    532
    First of all, thank for the interest in my level editor!

    Yes, it is. Just run the dungeon demo from the menu of the Web GL version linked below:
    http://www.freebord-game.com/MultiPlatformRuntimeLevelEditor/WebGL

    Yes, you can place a box collider on the ground level. If you don't add any mesh to it then it will be the invisible ground of you level. Add this box collider to the editor scene, but don't add it to the game scene, then while playing it will be possible to fall of the world on the edge of your placed objects.
     
    Ultroman likes this.
  49. Ultroman

    Ultroman

    Joined:
    Mar 10, 2014
    Posts:
    61
    Thanks a lot, m8. Great asset!
     
    FreebordMAD likes this.
  50. commodore

    commodore

    Joined:
    May 30, 2012
    Posts:
    36
    Any plans to add group selection?
     
unityunity