Search Unity

Multiplatform Runtime Level Editor

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

  1. FaberVi

    FaberVi

    Joined:
    Nov 11, 2014
    Posts:
    146
    I checked and in fact every object has the arrows of the same size .. The problem is that on a 7-inch tablet arrows appear too small .. There is no way to increase the scale factor of the same? I would also like to change the behavior of the touch, (rotate the camera with one finger instead of two .. is it possible?)
     
  2. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    In the LE_ObjectEditHandleCollider class you will find the camScaleFactor variable in the LateUpdate function. If you add code like the one below (on line 142) before the camScaleFactor is used, then you will double the screen size of all handles.
    Code (CSharp):
    1. camScaleFactor *= 2f;
    Take a look at the LE_InputDeviceTouchscreen class. This class defines the input behaviour on a touch screen. If you edit the OnTouchGestureDetected method like below, then you will rotate the camera with one finger. However, this would mean that when you edit the terrain or drag an object the camera is also rotated. This is the reason why rotating the camera is a two finger guesture.
    Code (CSharp):
    1. private void OnTouchGestureDetected(object p_object, TG_TouchGestureEventArgs p_args)
    2.         {
    3.             switch (p_args.Type)
    4.             {
    5.                 // cursor activation
    6.                 case TG_ETouchGestureType.PRESS_1_FINGER:
    7.                 {
    8.                     Vector2 touch = p_args.Position;
    9.                     m_inputHandler.SetCursorPosition(new Vector3(touch.x, touch.y, 0f));
    10.                     m_inputHandler.SetIsCursorAction(true);
    11.                     m_lastCursorActivationFrame = Time.frameCount;
    12.                 /*    break;
    13.                 }
    14.                 // camera direction
    15.                 case TG_ETouchGestureType.PRESS_2_FINGER:
    16.                 {
    17.                     Vector2 touch = p_args.Position;*/
    18.                     Vector2 delta = p_args.Delta;
    19.                     m_inputHandler.RotateCamera(touch, touch+delta);
    20.                     break;
    21.                 }
    22.                 // camera movement
    23.                 case TG_ETouchGestureType.PRESS_3_FINGER:
    24.                 {
    25.                     Vector2 touch = p_args.Position;
    26.                     Vector2 delta = p_args.Delta;
    27.                     m_inputHandler.MoveCamera(touch, touch-delta);
    28.                     break;
    29.                 }
    30.                 // zoom
    31.                 case TG_ETouchGestureType.ZOOM:
    32.                 {
    33.                     float zoomValue = p_args.Delta.x;
    34.                     m_inputHandler.MoveCamera(Vector3.zero, Vector3.forward*zoomValue*ZOOM_SENSITIVITY);
    35.                     break;
    36.                 }
    37.             }
    38.         }
     
  3. AshyB

    AshyB

    Joined:
    Aug 9, 2012
    Posts:
    191
    @FreebordMAD this looks like a really good product! Im very interested in purchasing it instead of trying to make my own but i have a few questions.
    1. i basically just want a level editor so some friends of mine can help me by making levels (or at the very least flesh out a rough level design) so i can focus on the rest of the game. but i dont want them using unity because firstly, it would be too complicated for them and i dont want them to have access to all the features unity provides because theyll end up stuffing things up like changing shaders or breaking prefabs .ect. if i build this into a standalone app that i can give to them, can i load into the unity editor anything they create? For example they send me a text file and from the unity editor i can load the level (not at runtime) so i can add finishing touches to it?
    2. Can the user create their own prefabs? for example they add a candle model to the scene. Then they add a light to the candle and change its color. Can they now save that as a prefab to make adding more to the scene easier?
    3. Can you lock objects on a per object basis? So the models i include for them to use cant be scaled? There are some things i dont want them to change.
    Looks like a great product. Keep up the good work!
     
  4. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    There is no such feature yet. However, on runtime you can load the level made by your friends and save all objects by selecting them in the Hierarchy window, then hitting copy and pasting them after you have stopped the game. It is a little tricky for the terrain, but you can take a look at this post here.

    This is on the list, but not possible yet.

    You can see what you can setup here. You can limit the movement, rotation and scale in many different ways.

    I will do ;)
     
  5. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    heyho!
    i got three quick questions:

    how would you do gizmos for the leveleditor? for example i want to create some gameplay logic related gameobjects. like spawn points or triggers for example. that looks like this somehow:

    they should be only visible in the level editor, but not in the game. how can i do this?

    second question:
    can i place two objects at the same time/have one object that has two objects inside? for example:
    i have a door and a trigger which i want to place as 1 prefab. after i placed it. i want to be able to re-arrange the door and the trigger independent from each other.

    third:
    how can i debug if a object gets rotated, scaled or transformed. something like on drag? i want to use the left mouse key also for panning the camera. so when iam not over a object i pan, when iam over a object, i deactivate the panning. thats no problem. i just need to know where the drag/rotate/scale action is hidden?
     
    Last edited: Jun 14, 2016
  6. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    You can create one prefab with two child objects. Add a script to the child object that should be visible only in the editor. This script will destroy the child object if it cannot find the editor with something like this:
    Code (CSharp):
    1. if (LE_LevelEditorMain.Instance == null)
    2. {
    3. ... Destroy
    4. }
    You cannot use the Unity Editor gizmos, because they will not work on runtime, but I'm sure that you will be able to create some gizmos from shaded meshes and sprites.

    Unfortunatelly, this is not possible yet. What you could do is to execute a place object command when your door is placed. You could listen for the LE_EventInterface.OnObjectPlaced event and call this command UR_CommandMgr.Instance.Execute(new LE_CmdPlaceObject(...)). Pass your trigger prefab to the place object command.

    Take a look at the LE_EventInterface.OnChangeLevelData event. If you get a LE_ELevelDataChangeType.OBJECT_TRANSFORM change type, then an object was transformed in this frame. The event will be raised in LateUpdate.

    p.s.: If you have a link to your game already feel free to send it to me, I'm curios since you are working on it for a long time already.
     
  7. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Hey, thanks for the hints. will try that out :)

    yeah, iam using the LE now in a total other game and just catching up on what i did half a year ago :) but i will let you know when i have something ready :)
     
    FreebordMAD likes this.
  8. AshyB

    AshyB

    Joined:
    Aug 9, 2012
    Posts:
    191
    @FreebordMAD Loving this editor at the moment.

    A few things I noticed could be added;
    1. Is it possible to add static batching, ie, here so when a user "plays" the level the buildings/colliders .etc have improved performance. I don't think it's enough just to mark the prefabs as static then expect them to work at runtime, surely it's not that simple?
    2. Using a container object to clean up the hierarchy window. Usually when I need to create a lot of objects like with my pooling system, I use one empty game object, and anything I instantiate gets parented under it so that in the hierarchy window there's not 50,000 objects I have to scroll through. This goes with the first point above about using a container object to combine all the static children to. This could be one container for everything, or a separate container for each "group", or one for static, one for dynamic or whatever. Just so its a little cleaner to look at.
    3. On the "Level" tab I was expecting to find a few more scene-relative settings such as being able to change the skybox, directional light settings/color, ambient, fog .etc
    4. The UI could benefit from the use of the automatic layout components. I find the UI doesn't always rescale correctly with different screen resolutions but they always work when put into automatic layouts with min/preferred sizes .etc. This is not really important since anyone can do it themselves, just thought I'd mention it. I'm in the process of doing this now because the object preview image doesn't scale very well on my computer (ends up being a tiny little box in the bottom corner) but now it expands to a good size.
    5. Lights. Not sure if I missed something or not, but there is no light prefab that ships with the level editor? I will make my own point light prefab and I'm sure it will work fine, but it would be nice if the level editor came with one as an example, more specifically with a way to "display" it in the editor. I'm thinking of parenting a light to a wireframe sphere primitive so the user can see where the light is being positioned in the editor then at runtime have the sphere primitive destroyed. But you might have a better/more implemented approach.
    Awesome tool. I look forward to having my players do all my level creation for me lol :D
     
  9. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Thanks for the feedback! I'm glad that you like the editor already!

    Unfortunately, the Unity static batching is not possible on runtime. From my experience the built-in Unity dynamic batching works better than self made mesh combining optimization. Having said that, I unfortunately don't see any chance to improve the performance by using batching here. However, you can use the MRLE streamed level loading feature to improve performance on big levels.

    This is a good idea I will put this on the list.

    This is already on the list.

    I will take a look at this.

    I see your point here. I will put this also on the list. The right way to go here would be to allow the user to change the light size and intensity. However, this can also be dangerous, because the players might not know that lights are performance expensive. I think that if you allow your players to add lights, then you also have to use deferred lighting.

    I'm looking forward to see some screenshots of your game! Once you have a playable game feel, free to send a link I would love to add a good example of using my editor to the MRLE store description.
     
  10. j2l2

    j2l2

    Joined:
    Mar 14, 2016
    Posts:
    14
    Hi,
    I consider buying it and have one question:
    Does it work in WebGL too? I use Unity 5.4 beta and webplayer is removed completely.
     
  11. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Hi, yes it does. I should upload a WebGL demo soon... ;)
     
    j2l2 likes this.
  12. AshyB

    AshyB

    Joined:
    Aug 9, 2012
    Posts:
    191
    @FreebordMAD On the LE_Object script, can you put in a string field called "Description" and then in the level editor, just above the preview icon for example, you could have a GUI text object that displays the description string. So when it comes to things like lights for example, you could put in the description "Using many lights can degrade performance, try to limit how many you use" or for another object you could have "It's best not to place this object too close to blahblah" .etc
     
  13. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Yes, this is a good idea, but you should keep in mind that if the text has more than 20 characters, then you have a 90% probability that people will not read it ;) it's a game not a book :rolleyes:
     
  14. j2l2

    j2l2

    Joined:
    Mar 14, 2016
    Posts:
    14
    Do you know when? I need to validate before buying :)
     
  15. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    I will upload a demo in the beginning of next week
     
    j2l2 likes this.
  16. AshyB

    AshyB

    Joined:
    Aug 9, 2012
    Posts:
    191
    Anyone know how to change the unity editor asset preview rotation? Unity previews all my objects from the wrong angle so I can hardly see what the actual object looks like. For example with a house it shows me the back of it instead of the front (where the differing details are) so when the level editor renders all the previews most of my objects look the same and I can't tell them apart. Example below (first image is wrong, second image is what I want);

    preview0.jpg preview1.jpg

    @FreebordMAD ever considered using an actual prefab as the preview? I used to instantiate (loadasync) the object when the user moused over the level editor button. It would instantiate something like y-1000 below the ground, on a separate layer (removed collisions, rigid body .etc), make it rotate around the y slowly and have a separate camera render-to-texture and then use that as the preview icon in the level editor. That way it wouldn't interfere with anything in the scene and I didn't have to render every single preview icon myself before hand and the user can have a good look before actually placing the object in the scene.

    Also I've come up with a quick and dirty editor script to help setup the object mappings if anyone is interested. I have a lot of objects (around 1000) as my level editor is only aimed at being used by the 10% of people ;) (mostly just friends who find unity too complicated) and rather than drag each prefab into a slot this editor script will set it all up for you. You'll have to change a few things if you have a different project setup than me. It requires your mappings to be placed in My Level Editor>Maps (so the folder should exist) and the resources folder can be up to 3 folders deep so;

    Assets then

    My Level Editor
    .Maps
    .Resources
    ..Buildings
    ...Residential
    ..Furniture
    ...Beds
    ...Chairs

    .etc

    It will put all the maps from deeper folders into the sub-objects of the maps in the folders above it .etc You then use the "Root" map in the level editor. Also all folders/files should probably not have the same file/folder name.

    You also need to change the public LE_Object[] ObjectPrefabs in LE_ObjectMap.cs at lines 10 to have a setter.

    editor.jpg

    Seems to work alright. You still have to render all the icons as usual by hitting the button on the map object inspector, for now...

    There's also a prefab creator included, drag anything from your hierarchy (scene) in and it will add the LE_Object script and mesh collider to it then save it as a prefab in the folder you choose (and delete the scene object).

    I use it to drag in 30 objects at a time then hit the "auto" toggle and it does them all for me.
     

    Attached Files:

    Last edited: Jul 2, 2016
  17. S1mon

    S1mon

    Joined:
    May 31, 2016
    Posts:
    12
    Hey, Someone know if it's possible to update UI object's library in runtime.
    I find how to add a Object in Le_Object_Map in runtime, but the UI library didn't update.
    Is there a Function to call? I didn't find it.

    Thanks
     
  18. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Since the new forum is going down for completeness here again: ;)
    You need to call LE_GUIInterface.SetObjects after changing the LE_ObjectMap, this will call LE_GUIInterface_uGUIimpl.SetObjects if you are using the full level editor implementation (see docs).

    However, this would add all objects to the tree browser. Therefore, you first need to clear the tree browser. You can do this by calling uMyGUI_TreeBrowser.Clear the best place to do it would be in LE_GUIInterface_uGUIimpl.SetObjects.

    Take a look at page 18 for more details:
    Please tell me if it worked!
     
    pixelsteam likes this.
  19. S1mon

    S1mon

    Joined:
    May 31, 2016
    Posts:
    12
    Hey @FreebordMAD,
    Sorry for the delay.

    It's work fine with your advice. The TreeBrowser update well but when I click on my new Object in the tree, there's no preview. And I can't instantiate my Object in the scene.
    It's there something I do wrong?

    Thank's
     
  20. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Do you see any errors in the console?
    Could you please post your code changes or send them in a private message?
     
  21. S1mon

    S1mon

    Joined:
    May 31, 2016
    Posts:
    12

    Sorry, it was my mistake. After a quick search, I made a mistake in my implementation of my Le_ObjectMap.
    It's work perfectly when I call LE_GUIInterface.SetObjects.
    Thanks for your help.
     
    FreebordMAD likes this.
  22. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    I'm glad to hear that it works now! ;)


    I'm not sure if I understand right what your plans are. I hope the following will help. You can check which objects are snapped to terrain in scripts by checking the LE_Object.SnapType property. You can iterate all LE_Objects by checking the LE_ObjectMap.ObjectPrefabs. You will also need to check the LE_ObjectMap.SubObjectMaps of each map. Please ask again if something is unclear!
     
    Last edited: Aug 24, 2016
  23. alqaholiq

    alqaholiq

    Joined:
    Oct 4, 2016
    Posts:
    2
    Hey there! I'm using MRLE for a project I'm currently working on. It is very smooth, but I do have a question to ask. When I spawn a door, for example, the rotation of it is clunky. Let me explain. When I spawn a door, I want it to be facing me. I want the spawned object's rotation to be based on where I'm facing. Currently, its rotation is based on global. It will always be facing north when spawned and I have to manually rotate it each time to face me, unless I'm facing north also. Is there a way to make the spawned object face the camera when it is spawned? Or maybe face the correct way if it is placed on a wall?
     
  24. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Hi, thanks for using the MRLE!

    Yes, there is a built-in way to control the spawn/placement rotation of the objects.
    Please take a look at Is Normal Oriented Placement property in the rotation settings of your door's LE_Objects script:
    http://www.freebord-game.com/index....time-level-editor/documentation/level-objects
    Your door prefab should "lay on the ground". Make the up axis (Y/green) of the prefab be the facing direction.
    This way while you drag n' drop door objects on walls, they will be always placed correctly on the wall.

    An alternative approach with more control would be to use the LE_EventInterface.OnObjectDragged event:
    http://www.freebord-game.com/index.php/multiplatform-runtime-level-editor/documentation/events
    Use the ObjectPreview property of the LE_ObjectDragEvent event args to directly work with the transformation of the preview object. You could rotate the object as you need here. Once placed the rotation that you have set for the preview will be also applied to the final object.

    By the way it would be super awesome if you could give the MRLE a review in the Unity Asset Store!
     
  25. alqaholiq

    alqaholiq

    Joined:
    Oct 4, 2016
    Posts:
    2
    Thanks for your reply. Unfortunately, it still doesn't work. Well, it does, but to a point. When I drag the door on the wall, its orientation is perfect. Thanks for that, but when I release my mouse it snaps back to a weird position. It faces upwards while still being in the wall. How do I make it stay how it is when I dragged it out?

    Thanks a lot for answering! I will review it as soon as I'm done with the project!
     
  26. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Have you combined both options from my first answer (Is Normal Oriented Placement and LE_EventInterface.OnObjectDragged)?
    The rotation of the object is modified by the methods below between the last OnObjectDragged event and the OnObjectPlaced event.
    Code (CSharp):
    1.  
    2.        ApplyRandomity(p_newInstance);
    3.        ...
    4.        p_newInstance.SolveCollisionAndDeactivateRigidbody(); // solve placement of rigidbodies
    5.        AddSnappingScripts(p_gui3d, p_newInstance);
    6.  
    However, if removing rigidbodies, randomity and snapping does not solve the issue, or if you want to keep those properties, then you could set the final object orientation in LE_EventInterface.OnObjectPlaced.
     
  27. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    This Runtime Levelgenerator looks great.
    One question:
    As what are Levels created with the Editor saved? Are they saved as unity scenes / unitypackages or only in binary format? Is it possible to save levels as unity format to be able to import the level to unity and work in the real editor afterwards?

    To explain the scenario:
    Players should be able to create level with predefined prefabs and save them as unity scene / package files, so the team can do a little review and add the levels finally to the main game.

    Thanks a lot
    Ronny
     
  28. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    The levels are saved as byte streams. In the example implementation the byte streams are saved to a text file.

    Yes, you can load any level while you are in the Unity Editor's play mode, then simply copy all objects in the scene hierarchy, stop the editor and paste all objects into a new scene.

    Players could upload the binaries to your server, e.g. as Base64 encoded text file.
    Your team would download the files and open the level while they are using the Unity Editor.
    A new scene would be created, the objects from the loaded level would be saved into this scene (copy all objects while in runtime, then stop the editor and paste the objects into a new scene).
    This scene could be exported as an Asset Bundle or included in the next game release to be presented to other players.
     
  29. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Hi, I'm quite interested in purchasing this asset. I would appreciate it if you can answer my doubts:
    1) Can I load the created level in Photon multiplayer games?
    2) Does it work with assetbundles to load prefabs remotely (on server) at runtime?
    3) How's the situation with occlusion culling and light map baking?
     
  30. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    The level editor will provide two byte arrays of the saved level.
    You could upload this data to your server and distribute the level among the different players.

    It works with Resources. Therefore, all prefabs must be included in the game build.

    Unfortunately, Unity does not yet support light map baking at runtime. Since the level is loaded on runtime it is impossible to use light mapping. I have not tested occlusion culling, but I assume that this also would work only with static levels.
     
  31. robertwahler

    robertwahler

    Joined:
    Mar 6, 2013
    Posts:
    43
    Hey there!

    Your asset looks very interesting but the EULA on the store page is not something I'm used to seeing on the asset store. Are you popping up the Creative Commons EULA before completing the purchase because there is an attribution requirement to use your asset?
     
  32. coverpage

    coverpage

    Joined:
    Mar 3, 2016
    Posts:
    385
    Thanks for the replies, really informative.

    I'm still not clear on the first question. So if each player can have the binary version of the scene and can somehow create scene objects out of it, they can load it at runtime? Have you tested if the created scenes by users can be created and shared (through the server. Doesn't have to be photon for this sharing part, I can make it any webserver) and then loaded all at runtime.

    This feature is very important for my application which is solely multiplayer.
     
  33. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    All licensing stuff is managed by the Unity Asset Store Team. As you can see, I have used a lot of different assets from the Unity demos. I suppose that some of them have the Creative Commons License, which forces the whole package to be under CC. If you don't use any of the demo level objects, then you are safe to go on without contribution. While I would like to see a reference somewhere, it is not mandatory for me.


    Hi, you need to give me more details about your multiplayer plans. What I can tell you is that it is possible to implement level sharing as a community feature. However, this is not part of the MRLE and you need to do it yourself. Take a look at these games as a reference:
    - Mad Snowboarding
    - RC Simulation 2.0
     
  34. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Thanks a lot for your response FreebordMad.
    Nice that there is something like a workaround work with binary / byte streams in unityeditor.
    Some questions I still have:
    1. As I understand other players can download the base64 enconded text file and work with it directly from your editor?
    So gamers can upload their created levels to server and download also levels and import it to work also on levels from other gamers? We plan to create a big community where gamers can work on our game using your editor.
    2. Very important for us: Do you plan to add script support for players? So they can add scripts to objects if we provide the scripts? Think of door scripts or scripts which do something with objects. Right now I did not see a way (in your online demos) to add predefined Scripts (saved as Prefabs) to objects.

    Thanks again for your time.
     
  35. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    You're welcome ;)

    Yes, but this is not part of the MRLE, this is something that you need to code yourself. Please take a look at the games below as a reference for community levels implemented with the MRLE.
    - Mad Snowboarding
    - RC Simulation 2.0

    You can simply add the scripts that you want to your prefabs. The prefabs are loaded from resources including all attached scripts. Please take a look at the docs here:
    http://www.freebord-game.com/index....time-level-editor/documentation/level-objects
    You can scroll down to this part "Variations properties of the 'LE_Object' (added in v1.30):"
    For example, your door could have different variations. One would be openable, another would be static and the last one would need a key to be opened.
     
  36. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    Hello everyone, I am a new buyer of this level editor too.. Without reading all 9 pages, but with some research i would like to ask/recommend for some features.

    1) I think this is already requested and i would like to know if its already in your roadmap, saving the levels on a format that the developer can re-import it in his scene. I know the workaround with runtime copy, then stop and paste of the objects, but still is not that handy.

    2) Server saving, is that possible? to have a cloud/server space and have people saving their finished work there so i can grab the levels and use them.

    Also i get an error when placing my objects on scene: NullReferenceException: Object reference not set to an instance of an object.

    Unity 5.4.0f3

    Best Regards.
     
  37. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    Quick question: How do I retrieve the name of the currently loaded level? (Not the Unity Scene.) I'm using the latest version of MRLE and the Save/Load File Picker extension.
     
  38. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    To be honest, it is not on the list yet. I though that the workaround is good enough for the moment.
    I think that if you want to save a map as a scene, then there is no need to have the runtime level editor anymore, because it is not possible to save scenes on runtime outside the Unity Editor.
    Please correct me if I'm wrong. In which case would you need such a feature?

    It is indeed on the list. I plan to crate example php/sql code that you can host on your own server.

    Please give me more details on that. Is this happening with one of the demos scenes. Have you changed something. Please send me your editor log or at least a screenshot with the full stacktrace in the console.


    Please take a look at the following method
    FileSelectionExtensionLoader.SelectAndLoadFile
    as you can see on level reload the member variable m_reloadLevelName is used to get the last loaded level name.
    You can make this variable public or even static. Alternatively, you can pass over its value to some of your scripts every time it is assigned.
     
  39. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    I would like someone to create a full scene as a contest for my game, and the best one will be included in my game and the winner will get some prize, with such a feature i would be able to use his whole scene in my project (with terrain changes etc.).


    I use your demo scenes, and all works ok with your objects, when i insert one of my custom ones i get this error. This happens with many different objects not just one.
     
  40. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    I assume that your players will have your game executable right? Or do you really want to let your players download the Unity Editor? Because, if your players will have only the game, then they will not be able to save scenes (it is not possible to create a Unity scene outside of the Unity Editor). What you would do is to load the scenes created by the players with the MRLE, test them and select the best one. Then you would open only this best scene in the Unity Editor (not with the executable of your game, but with your game running in the Unity Editor). Copy all objects and save them to a scene.

    Please reproduce the error and then provide me the log file (you can just paste the contents here).
    To get the log file hit the "open" button in the console's top right.
     
  41. SSL7

    SSL7

    Joined:
    Mar 23, 2016
    Posts:
    349
    NullReferenceException: Object reference not set to an instance of an object
    LE_LevelEditor.Core.LE_Object.LateUpdate () (at Assets/LapinerTools/LevelEditor/Scripts/Core/LE_Object.cs:800)

    and also in some objects this one:

    MissingComponentException: There is no 'MeshRenderer' attached to the "Cube" game object, but a script is trying to access it.
    You probably need to add a MeshRenderer to the game object "Cube". Or your script needs to check if the component is attached before using it.
    LE_LevelEditor.Core.LE_SubMeshCombiner..ctor (UnityEngine.Material p_material, UnityEngine.Mesh p_mesh, UnityEngine.Renderer p_renderer) (at Assets/LapinerTools/LevelEditor/Scripts/Core/LE_SubMeshCombiner.cs:30)
    LE_LevelEditor.Core.LE_Object.LateUpdate () (at Assets/LapinerTools/LevelEditor/Scripts/Core/LE_Object.cs:855)


    I read the manual and the Cube part, but i dont understand, the objects have colliders and also i can move them perfectly.
     
  42. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Please provide me the editor log file. In the log file I could see the coherence of the errors, e.g. the second error is probably causing the first one.

    It looks like you have objects with an attached MeshFilter, but without a MeshRenderer. Is this the case?
    Please send me some screenshots of the inspector showing the setup you have on one of the objects that have these errors.
     
  43. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    Help! Once I go white, I can't go back!

    I found a major bug when using the terrain editor to paint textures. Darker textures appear semi-transparent over lighter textures. However, I can paint light textures over dark ones without any problems. It's like dark textures aren't painting at full opacity or something. See screenshots below for examples.



    Started with all black terrain. Painted white over that just fine. Tried to paint black over it and got this :p


    Here's another example using a variety of textures.

    I have tested this in my project, as well as the example project. Also tested under all combinations of Deferred/Forward rendering and Gamma/Linear colors to see if that made any difference (it didn't). Same problem occurs under all settings, and is easiest to see under Deferred Linear in good lighting.

    Also, if I paint the terrain created in the level editor, directly in the Unity editor, the textures paint just fine. In the screenshot below you can see this in the bottom left corner where the dirt is fully opaque.



    I've been trying to figure this one out for the past hour, but I'm totally stumped.

    (BTW, this asset is amazing so far!)
     
  44. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    Ran into 1 more bug today, although not nearly as concerning as the one above. The Perspective Gizmo does not appear in Deferred Rendering mode, only Forward Rendering.
     
  45. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    First of all, thank you very much for reporting the problems and thanks for the detailed screenshots.

    I was able to reproduce this. The problem can be found in the LE_TerrainManager.PaintTexture method.
    After calculating the target values the results are normalized in the following line:
    Code (CSharp):
    1. alphaMaps[indexX,indexY,indexZ] /= alphaMapsSum;
    This line will make sure that the sum of all texture layers will be 1. However, I have not taken into account that only 8 bits are available for this calculation. Due to a floating point error the first texture is not set to 0, but is left over with a some small decimal.
    I now know the problem and I only need to make a generic solution that will work independent of the amount of used textures. It is getting late here now, but you can expect to get a fix no longer than within a week!


    I was not able to reproduce this. I have tried to change the rendering mode of the Main Camera in the scene and the gizmo was always rendered correctly (Unity 5.4.0). Please give me your reproduction steps and your Unity version.

    I love to hear that and it would be super awesome if you could put this in a review on the Asset Store! It would help me much!
     
  46. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    I have found a solution and the fix is ready! Please provide me your e-mail address, then I will send you the changed script file.
     
  47. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    Wow! Thank you! My email address is: hakjakgames@gmail.com

    Your asset will be a very important part of my project. You can check it out at HakJak.com and let me know if you'd like to be part of the closed Steam Beta testing that should start next month, and a free copy of the game when it releases.

    Concerning the Perspective Gizmo, it appears that Unity's Player Settings may be the root of the problem, or perhaps something behind the scenes in MRLE that I don't understand.

    I'm using Unity 5.4.2f2 and below are steps to reproduce/understand the gizmo issue:
    1. New Project & import MRLE
    2. Add LE_ExampleEditor (index 0) and LE_ExampleGame (index 1) to Build Settings.
    3. Change Main Camera to Deferred and run the game. Everything looks fine. Change camera back to Forward.
    4. Here's where things get weird. Edit-->Project Settings-->Player. Change to Deferred rendering. Both cameras should now be Deferred when you run the game. Run the game and NO gizmo appears.
    5. Now change the UI Camera to Forward. Run the game. Gizmo now appears, but there is a black box around it and the image ghosts. Change gizmo to orthographic and it goes away. Change back to perspective and it returns. o_O
    6. Return to Edit-->Project Settings-->Player. Change to Forward rendering. Manually change the Main Camera to Deferred and UI Camera to Forward and everything works as it should again.
    So manually changing each camera's rendering mode works fine and is quick fix, but changing the defaults doesn't.

    :cool: Just left a stellar review for this asset. Keep up the great work man! :cool:
     
    FreebordMAD likes this.
  48. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Check your mail inbox, the fix should be there. First of all, congrats to the successful Kickstarter!
    Guts and Glory looks totally EPIC :D
    The gore level of Guts and Glory reminds me of my first game Freebord The Game (and the only hit game I ever had)!
    It would be super awesome to see the beta and the MRLE integration. I would love to add your game to the list on the Asset Store page of MRLE as soon as you have some material showing the editor in action or the game is released.

    Thanks for your super epic review!

    I will take a look at this. This behaviour sounds very strange!
     
  49. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    Sure, no problem! I would prefer after it launches on Steam Early Access though (Feb-Mar). I definitely want to support your work and help this remain the #1 level editor in the asset store.

    Very strange indeed... might even be a Unity bug.

    One last question for today: I feel dumb for having to ask this, but how I can change cloning an object from Ctl+D to Ctl+C, so the camera doesn't move every time I duplicate an object? I can't find the reference to this in the scripts.
     
    FreebordMAD likes this.
  50. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    You will find this hardcoded in the OnGUI method of the LE_GUI3dObject class.
    Code (CSharp):
    1. if (e.type == EventType.KeyUp && e.control && e.keyCode == KeyCode.D)
    2.  
    3. // please change the line above to the line below
    4.  
    5. if (e.type == EventType.KeyUp && e.control && e.keyCode == KeyCode.C)