Search Unity

Multiplatform Runtime Level Editor

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

  1. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    58
    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:
    575
    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:
    58
    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:
    575
    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,098
    Hi, is there any plans to support mod.io?
     
  8. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    575
    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,098
    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,098
    Any chance you can fix these issues for 2019.3 users? Thanks
     
  11. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    575
    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:
    58
    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:
    575
    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:
    58
    Sorry for not checking the documentation, it answered the questions I had.
     
    FreebordMAD likes this.
  15. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    79
    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:
    575
    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:
    11
    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,098
    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:
    575
    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.
     
    derkoi, Fibonaccov and Bioman75 like this.
  22. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    58
    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:
    575
    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:
    575
    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:
    575
    @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:
    16
    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:
    575
    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:
    16
    Thanks for the quick reply! This sounds a lot easier than what I had expected. :D
     
    FreebordMAD likes this.
  31. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    58
    I made a grid of ObjectLeafPrefabs and am trying to populate them.
    There is a lot going on in the uMyGUI_TreeBrowser script, I keep getting turned around. I'm trying to get LE_ObjectMap Children into an array of ObjectLeafPrefabs in scene?
    sudo code:
    Code (CSharp):
    1. for (int i = 0; i < allObjects.Obj[0].ObjectPrefabs.Length; i++)
    2.             {
    3.                 setupLeafPrefab(allObjects.Obj[0].ObjectPrefabs[i], ObjectLeafPrefabArray[i]);
    4.             }
     
  32. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    575
    Hi Tim, sorry for the late reply. Why are you trying to modify the object tree browser on runtime? Can you provide some screenshots of what you want to achieve?
     
  33. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    58
    As you get into thousands of objects, the default tree browser requires a lot clicking and scrolling. I made a grid view separated from the navigation, but need the grid to populate when I pick an LE_ObjectMap.
    tabs_view.JPG grid_view.JPG
     
  34. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    575
    Ok got it, should be easy though. I hope you didn't went to far away from the original implementation. For the original implementation it would look like below.

    Add the following code to the LE_GUIInterface_uGUIimpl class. It will delete all contents of the tree browser and refill it with the new object map data.
    Code (CSharp):
    1.  
    2.  
    3.         public virtual void ReplaceTreeBrowserObjectMap(LE_ObjectMap p_newObjectMap)
    4.         {
    5.             if (OBJECT_BROWSER != null)
    6.             {
    7.                 OBJECT_BROWSER.Clear();
    8.                 OBJECT_BROWSER.BuildTree(SetObjectsRecursive(p_newObjectMap, 0));
    9.             }
    10.         }
    Then use the code as in the example script below
    (create a new .cs file named ReplaceTreeBrowserContents).
    Code (CSharp):
    1. using LE_LevelEditor.Core;
    2. using LE_LevelEditor.UI;
    3. using System.Collections;
    4. using System.Collections.Generic;
    5. using UnityEngine;
    6.  
    7. public class ReplaceTreeBrowserContents : MonoBehaviour
    8. {
    9.     [SerializeField]
    10.     public LE_ObjectMap p_newObjectMap = null;
    11.  
    12.     private void OnGUI()
    13.     {
    14.         LE_GUIInterface_uGUIimpl uGUIImpl = FindObjectOfType<LE_GUIInterface_uGUIimpl>();
    15.         if (uGUIImpl != null && p_newObjectMap != null)
    16.         {
    17.             if (GUI.Button(new Rect(Screen.width/2-50, Screen.height/2-50, 100, 100), "Replace with Map " + p_newObjectMap.name))
    18.             {
    19.                 uGUIImpl.ReplaceTreeBrowserObjectMap(p_newObjectMap);
    20.             }
    21.         }
    22.     }
    23. }
    24.  
    Follow the following steps.
    1. Start the LE_ExampleEditor scene
    2. Add the ReplaceTreeBrowserContents script to the main camera
    3. Select the object map you want to load in the inspector of ReplaceTreeBrowserContents
    4. Hit the OnGUI button 'Replace with Map ...' in the middle of the screen

    Result should be something like that:
    upload_2021-4-6_21-55-51.png

    I hope it helped, would be cool to hear if it did. Don't hesitate to revert if you need more info.
     
    Last edited: Apr 6, 2021
    tim44 and Bioman75 like this.
  35. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    58
    I can customize navigation now, thanks
     
    FreebordMAD likes this.
  36. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    575
    Awesome, glad to hear.
    Just in case you didn't write one yet, a review would help a lot ;)
     
  37. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    58
    Done. Keep forgetting to do that
     
    FreebordMAD likes this.
  38. FPVFreerider

    FPVFreerider

    Joined:
    Jun 8, 2015
    Posts:
    4
    FreebordMAD: Thanks for providing such great support the last time I had an issue. I hope you are still checking this thread. I now have a minor thing I'm struggling with. Not sure if this have been fixed in an update, but since I have made so many changes to the code itself I am stuck with using an older version.
    Anyway, the thing is, that I have noticed that when using the editor - if you move/rotate/scale an object (by dragging the arrows) the object that is behind the mouse at the point when you let go of the arrow gets selected.
    It would be so much better if the currently selected object (the one that you are moving/rotating/scaling) stays selected after a translation.
    I'm pretty sure that this can probably be fixed by a single line of code, but I have struggled to be able to find out just how myself. So it would be great if you could provide a code snipped, if possible, that I can paste in to the existing code to make it so that no new object is selected when dragging the translation arrows.
     
  39. tim44

    tim44

    Joined:
    May 15, 2019
    Posts:
    58
    Does a fresh copy of the editor have the bug? Open a new project and import fresh.
    I've modified LE_GUI3dObjects.cs->SelectObject() extensively for VR selection behavior, that would be the first place I would look and compare with a fresh copy.

    In the original it is sometimes difficult to see if you are clicking a handle or not, but that doesn't sound like the problem you are describing. I modified it to highlight the handles on mouse hover, but like you, my code is too much of a mess from the original to share.
     
  40. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    575
    This is a funny one, it took 7 years until it was reported ;)

    It is an easy fix though and @tim44 is on spot nailing it down to LE_GUI3dObjects.SelectObject().

    Please try to do the following two changes.
    1. Add the code below to the very beginning of LE_GUI3dObjects.SelectObject().
    Code (CSharp):
    1.             if (m_selectedObject != null && m_selectedObject.EditHandle != null && m_selectedObject.EditHandle.IsDrag == true)
    2.             {
    3.                 return; // do not change selection if the currently selected object is being moved
    4.             }
    This code will check if the currently selected object has an active EditHandle and if it is currently being dragged. If this is the case, then the selection will not be changed.

    2. There is a frame delay before SelectObject is getting called, so the quick fix here would be to make LE_ObjectEditHandle.IsDrag more tolerant by replacing the 1 in the condition to 2. Should look like that:
    Code (CSharp):
    1.         public bool IsDrag { get{ return Time.frameCount - m_lastDragFrame <= 2; } }
    Please give me a note after trying, I would like to know if you see any side effects. It worked well for me in a short test.



    P.S.: just in case you didn't rate yet anyway, seeing "thanks for providing such great support the last time I had an issue." in an Asset Store Review would be super cool and help a lot.
     
    devotid likes this.
  41. FPVFreerider

    FPVFreerider

    Joined:
    Jun 8, 2015
    Posts:
    4
    Hehe, yes, I guess it remained unreported since it only occurred when translating the objects a very small amount. (I forgot to mention that in my previous post)
    Thank you for your quick solution! It works perfectly fine now as far as I can tell.
    Yes, I have already given the asset a five star review, I will update it now as you have provided very impressive support once again.
     
    FreebordMAD likes this.
  42. BanicaTom

    BanicaTom

    Joined:
    May 28, 2017
    Posts:
    4
    Hello,

    This product looks very promising. I can envision projects where it is exactly what I am looking for. However, there is a scenario that I did not see explicitly accounted for in the documentation. If I have a game where the player is able to build his or her own house in stages... each accomplishment level gained would enable the player to enlarge, upgrade the house etc.

    I saw that the location for a build site could be restricted. Perfect. It would be great to have preset modules (rooms, additional buildings) that the player could choose tl add to the existing structure and have the option to change textures / colors... but that other settings enlarge/shrink/y-axis etc) could be restricted. Is that possible without doing heavy coding (asks this less-than-proficient coder)?
     
  43. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    575
    Sorry for the late reply. If your house consists of specific snapping parts, then you can build it similar as the blue curved boxes that use the build in snapping tools - you can check it in the demo. You would still need to code restrictions and unlocking.
    Regarding scaling and rotation you have various built-in options.
    Check the doc page below for details on restrictions and snapping:
    http://www.freebord-game.com/index....time-level-editor/documentation/level-objects
     
  44. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    85
    Hi @FreebordMAD ,
    Is there a way to change IS_TERRAIN_EDITOR during runtime? I want players to have a choice either to use Unity Terrain or import OBJ mesh terrain at runtime. I can always make this value public and edit it runtime but I dont like tampering with the script unless I have to.

    I want players to import assets at runtime like custom OBJ objects ,will this asset be able to serialize any gameobjects or will I have to write my own serialization?
    Thank You for making this awesome asset.
     
  45. cperisson

    cperisson

    Joined:
    Sep 2, 2016
    Posts:
    1
    Hello

    I've been trying to solve this problem for days. Dragging objects works perfect in the Editor, but in IOS the dragged object never detects the surface (IN_3D_PREVIEW or NOT_PLACEABLE). Following the code I detect that LE_GUIInterface.Instance.delegates.IsObjectDragged () always returns false in IOS, but I don't know why

    Some help? Thanks!
     
  46. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    575
    Hi @TonismoGames - sorry for the very late reply. There is quite some loading that depends on the IS_TERRAIN_EDITOR flag. I would recommend to simply reload the scene after changing. You could either have two scenes (copy pasted) with the only change being the IS_TERRAIN_EDITOR flag. Depending on what the players have chosen you load the right scene. Alternative would be to set the flag in an Awake function with a script executed earlier than the MRLE main script. I hope the reply came in time or you already found a solution. Let me know if it works.

    Does it work on any other platform e.g. Android or WebGL?
    Does it happen in the default example scenes as well?
    Which Unity version are you on?
     
  47. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    85
    Great idea! I made a workaround by making IS_TERRAIN_EDITOR public then allow user to choose. Then it activates Level Editor and UI to initialize everything.

    We need a Discord server for all your assets so it is quicker to solve issues and make suggestions. You get live update and all that.
     
  48. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    85
    @FreebordMAD
    How are objects deserialized upon load? Does it just instantiated an object based on asset ID? I have had issues with instantiating objects by ID in the past. The wrong object would be instantiated because of asset ID change.
     
  49. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    575
    Objects are loaded by resource path. The resource path is what is being saved. So if you rename objects the wrong one might get loaded.
     
  50. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    85
    @FreebordMAD
    Hi again!
    I ran into another road block. I am instantiating a UI button everytime an LE_Object is added and using this UI button to select a specific LE_Object.
    1)How do I set LE_Editor so the LE_Object I want to select and then focus on it?
    Code (CSharp):
    1.     [System.Serializable]
    2.     public class ImportedObjectButton : MonoBehaviour
    3.     {
    4.         public RuntimeLevelEditor runtimeLevelEditor;
    5.         public CustomMeshObject customMeshObject;
    6.         public Text importedObjectTitle;
    7.  
    8.        private void Start()
    9.         {
    10.             importedObjectTitle.text = customMeshObject.name;
    11.         }
    12.         public void SelectGameObject()
    13.         {
    14.            RuntimeLevelEditor.AddLE_ObjectComponent(customMeshObject);//adds LE_Object to wrapper
    15.             /*
    16.              * Select current object and focus on it
    17.              */
    18.         }
    19.         public void DeleteImportedOBJ()
    20.         {
    21.             runtimeLevelEditor.RemoveMeshReference(customMeshObject.name);
    22.             Destroy(customMeshObject.gameObject);//Destroys LE_Object wrapper
    23.             Destroy(gameObject);//Destroys this UI button
    24.         }
    25.     }
     
unityunity