Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

UniRPG Tile Ed

Discussion in 'Assets and Asset Store' started by Leslie-Young, Aug 21, 2012.

Thread Status:
Not open for further replies.
  1. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    with new scene it works file. i think problem is related that i used a map and db that created with previous version of unirpg.

    also why dont you release your source code without zipping it. most of packages doploys their source code and unity builds it. for each update i have to unzip unity4 dlls.

    you can also check this;

    http://docs.unity3d.com/Documentation/Manual/PlatformDependentCompilation.html
     
  2. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    i think i found problem. when i change my tiles set after i draw a map problem begins. i cannot delete tiles and left click deletes some tiles on the map.
     
  3. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    When you update, do what Jaimi does http://forum.unity3d.com/threads/148235-UniRPG?p=1168165&viewfull=1#post1168165

    Sadly my custom gui work read all the icons and other textures from the DLL and Unity won't be able to handle that code outside of DLLs. I made this asset before Unity 4 and before I knew what a hassle it would be to support the changes made to Unity 4 when using DLLs. At some point I will look into creating a version 2 of this tool and then rewrite everything to work without dlls, but first I need to finish my latest project.
     
  4. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    What do you mean by "change my tiles set after i draw a map"? Perhaps you should explain the exact steps you are taking so that I can try reproduce it on my side and see what happens.
     
  5. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    use unity 4.0.1f2

    1.create prefab db
    2.create expanding tile set
    3.set all tiles including optionals. exceptionally set sides with single prefab.
    4.create a dungeon map with this prefabdb
    5.draw a map
    6.try delete(right click) and draw more
    7.edit prefabdb. correct sides tile with sides prefab.
    8.try to delete and draw more on map.
     
  6. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    I'll PM you to discuss this further and see what the problem is cause we are now just spamming this thread with debugging
     
  7. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    I've submitted an update (1.7f) that fixes a problem where you can't delete an Expanding-Tile Type on Dungeon Maps.
     
  8. Randhall

    Randhall

    Joined:
    Feb 21, 2013
    Posts:
    12
    Hi I've just purchased the UniRPG Tile Editor and after importing it to the project and extracting the dlls i still don't get the UniRPG menu on the bar. The components entry for your extension is there and i can mark prefabs as both Plops and Tiles but can't open the editor windows to work with them.

    I'm running the free Unity version 4.0.1f2
     
  9. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    The vids and screenshots are from an older version. With the last pdate the Asset Store moderator(s) decided I'm not allowed to use the menu structure I've been using since the 1st verison of Tile Ed, so I had to change everything. You will now find the PrefabDB and Map creation tools under GameObject -> Create -> UniRPG ...
     
  10. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    Feature Requests

    1.Package with source code form.(no dlls) (i know you will do it later :) )
    2.recalculate neighbourhoods on delete tiles
    3.layers for tiles. non rotating base layer and rotating upper layer. it is useful when base is not a solid color but tileable at specific rotation.
    4.Expanding grid after create it.
    5.changing map height after create it.
    6.adding tile piece script automatically when trying to set tile set.
     
  11. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    light map cause increase of drawcalls. because there are many tiles on scene draw call count becomes over 400. so there should be a feature like mesh bake/merge. if we use single image and single uv draw call count will be few.
     
  12. Randhall

    Randhall

    Joined:
    Feb 21, 2013
    Posts:
    12
    Thanks downloaded an update and everything works now. (But i do get the UniRPG menu entry)
    Would be cool to see it updated not to use the dlls :)
    Anyways great tool thanks for the help :)
     
  13. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    314
    $unitile bug.jpg

    I've been following the tutorial for Bitgem's package and when I click "edit prefab DB", the prefabDB I have does not display anything. Am I missing a step or something?
     
    Last edited: Mar 3, 2013
  14. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    The bitgem pack will not have a defined PrefabDB. You are supposed to create a prefabdb and fill it with the tile art they provided if you want to make that pack work with Tile Ed. See the documentation and other videos on how a prefabb is created and then used with a map.

    And just to be sure, you are not getting red error messages in the unity console and you did extract the DLLs made for Unity 4 after installing the UniRPG Tile Ed package?
     
  15. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    314
    I had already created the prefabDB and started painting (you can see that from the background of my posted image), but for some reason my DB had become corrupted or something. However, I just started over and didn't seem to experience it again.

    I like the overall product, but I'm noticing a huge dip in performance when attaching box colliders to the wall prefabs. I think if I had attached colliders to the floor tiles the game would be unplayable. I just used a single plane to end up doing the floor.

    How should I go about adding collision to walls without getting a big performance drop?

    I'm using between 2 to 9 32x32 maps at a given time.
     
    Last edited: Mar 3, 2013
  16. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    The best would be to add a few big colliders when you are done painting and know the layout of walls and floors.

    The tilesets disappearing could be when you use Unity 4 and did an update. When you update you need to unselect the DLLs since the default DLLs are for Unity 3 and you want to extract the Unity 4 ones. If you overwrite the current DLLs (which is allready Unity 4 ones) with the update's Unity 3 DLLs then all your prefabs will get broken.

    I think I'm gonna put the Unity 3 DLLs in a zip file too from the next update onward so that you can't accidently overwrite these with the wrong version.
     
    Last edited: Mar 4, 2013
  17. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    if you zip both 3.0 and 4.0 files. most of people miss to unzip new dll files. why dont you create single dll for both 3.0 and 4.0? all packages i use have single dll. by the way, what is the best is to release your package as source code form. :)
     
  18. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Hi,

    use this marvellous Boudary tool :
    http://forum.unity3d.com/threads/159529-Boundary-Tool-RELEASED
     
  19. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    how can i move a prob after i placed it to the map using tile snap?
     
  20. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    when brush size is 2 you cannot delete.
     
  21. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    The problem is that the code won't compile. Unity 4 has a few changes in it that differes from Unity 3, for example function names/classes which where changed - mostly related to the thing taht generates the little preview thumb of a tile. If I choose to do it the Unity 3 way wthen the DLL won't work on Unity 4 (thus the error messages you might have sene in the unity console), same if I choose to do it the Unity 4 way - then the DLL won;t work in Unity 3. Therefore the seperate DLLs :(
     
  22. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046

    A plop is moved like any other gameobject. They are not controlled by Tile Ed after placement. The tool is just there to help you with the initial placement so you can get it nicely alligned to the tiles.

    To edit plops you would want to exit the map's edit mode using the toggle for that in the inspector. Then you cna easily switch to the normal unity move and rotation controls and move the plops around as needed.
     
  23. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046

    Thanks, I'll look into it.

    [edit] I'm submitting an update with a fix for this.
     
    Last edited: Mar 5, 2013
  24. hoishing

    hoishing

    Joined:
    Dec 13, 2012
    Posts:
    2
    Hi, I got a problem that the changes of PrefabDB cannot be saved after restarting Unity.

    If the PrefabDB is just a game object on the scene, I can add / delete tiles without any problems, as long as I remember to save the scene before restarting Unity. However, after making the PrefabDB as a game asset, the tiles that I added afterwards will be lost after restarting Unity. The PrefabDB just go back to the moment that I make it as a prefab…

    How can I update the PrefabDB after making it as a prefab?

    I am using Unity4 with UniRPG 1.7f on Mac
     
    Last edited: Mar 5, 2013
  25. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    is it possible to add snap move feature for plops with unirpg?
     
  26. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    can you check this?

    http://docs.unity3d.com/Documentation/Manual/PlatformDependentCompilation.html

    you can separate 3.0 and 4.0 code lines.
     
  27. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Thanks for spotting this. I'll fix it and submit an update soon.
     
  28. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
  29. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046

    There is snapping features when you use the plop tool to place the plop the first time. Per tile, 1/2 tile, 1/3 tile, etc and per grid or tile or collider height. After palcement you can only use the Unity movement tools and will have to use Unity's snapping feature for snapping.

    See "unit snapping" topic, http://docs.unity3d.com/Documentation/Manual/PositioningGameObjects.html
     
  30. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    yes. i said it for code form.
     
  31. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    ah, ok. I thought you meant in the DLLs cause that is what is being discussed in the text you quoted. I know about platform defines and would obvioulsy use them if a non-DLL version of this tool was released.
     
  32. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    check your draw call count on game/stats window.
    import scripts asset by right click on hierarchy/import packages/scripts
    add "Combine Children" script to your map game object
    check your draw call count on game/stats window.

    if you have pro also turn soft shadows on.

    :)
     
    Last edited: Mar 7, 2013
  33. WitchKing

    WitchKing

    Joined:
    Jan 4, 2013
    Posts:
    13
    Hey Leslie, I dunno if anything's changed in the latest update, but I've been getting something weird.

    When I make a new PrefabDB and a Dungeon Auto-Tile Set, whenever I try to drag a tile prefab into one of the slots, such as a floor or wall for example, I always get the big "Not a valid TilePiece Prefab" error box popping up. This happens with your included sample prefabs.

    I've had it all working previously and my previous dungeons work fine, but now I can't make a new tile set as I get this error every time.
     
  34. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Yes, something changed :)

    First extract the DLLs for your version of Unity (they are in the Documentation folder), else you won't actually have the update.

    Next, make the provided prefabs into TilePieces by selecting the tile prefab(s) and then adding the TilePiece component.

    I made the changes to how the DLLs are distributed so that existing prefabs and maps won't get broken with an update. It meant I had to remove them from the project and thus break my samples but the sample maps wasn't that great. You only really need the art to get started with testing your own maps and to see how your own tiles can be created to work with the package.
     
  35. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    314
    The way I use this tool is to created a lot of different maps, and then connect them after instantiating their prefabs.

    Now I want to go back and edit these prefabs, however, I am getting errors when hovering over the map's grid that state things like
    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. UniRPGEditor.MapInspectorBase.OnSceneGUI_Editor () (at d:/Work/Unity AS/UniRPG Tile Ed (Unity 4)/_UniRPG_Assemblies/UniRPGEditor/MapInspectorBase.cs:1210)
    4. UniRPGEditor.MapInspectorBase.OnSceneGUI () (at d:/Work/Unity AS/UniRPG Tile Ed (Unity 4)/_UniRPG_Assemblies/UniRPGEditor/MapInspectorBase.cs:1104)
    5. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    6.  
    I have not updated the project since I first bought it a week ago. What is wrong? These prefabs (which are a freaking lot...) now seem to be locked away forever, and I'll have to spend a whole day recreating every piece I want to make edits to.

    How can I fix this?

    Also, do you really have a large Unity 3.0 customer base? I really think you're making the .dll issue too much of a headache for everyone by not just stopping support for unity 3.0 and moving completely to 4.0. Focusing on Unity 4.0 alone will also help you spend more energy polishing this product so that so many quirky things aren't happening.
     
    Last edited: Mar 9, 2013
  36. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    314
    I just updated the project and unzipped the files like instructed, and I still can not alter my prefabs after dragging them into the scene.

    I'm getting spammed with this error when putting my cursor over the map:

    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. UniRPGEditor.MapInspectorBase.OnSceneGUI_Editor () (at d:/Work/Unity AS/UniRPG Tile Ed (Unity 4)/_UniRPG_Assemblies/UniRPGEditor/MapInspectorBase.cs:1210)
    4. UniRPGEditor.MapInspectorBase.OnSceneGUI () (at d:/Work/Unity AS/UniRPG Tile Ed (Unity 4)/_UniRPG_Assemblies/UniRPGEditor/MapInspectorBase.cs:1104)
    5. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    6. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    7. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    8. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    9. UnityEditor.SceneView.CallOnSceneGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/SceneView/SceneView.cs:1335)
    10. UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/SceneView/SceneView.cs:839)
    11. UnityEditor.SceneView.OnGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/SceneView/SceneView.cs:728)
    12. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    13.  
    14.  
    My prefabs "work" in the game itself, I just can't edit them because of this error.


    Edit:

    I also get this warning commonly when using this tool:
    Code (csharp):
    1.  
    2. Cleaning up leaked objects in scene since no game object, component or manager is referencing them
    3.  Texture2D has been leaked 2 times.
    4.  
     
    Last edited: Mar 9, 2013
  37. dreamdev179

    dreamdev179

    Joined:
    Mar 10, 2013
    Posts:
    1
    I was wondering how much control do we have over the tiles in this code , for exemple : can i easily get the information of a specific tile and implement the a* algorithm or other Ai behaviors? Thank you for your response! Really looking in buying this package!
     
  38. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    @Disastercake, I'll get back to you after going through this properly. Hopefully by tomorrow evening.

    @dreamdev179, You have full access to the code of the Tile Ed if you want to make changes to specific things like the Tile class, for example to make it more intelligent and know about its neighbour tiles. These kinda things are not in by default since this thing is just a tile painter and got nothing related to actual runtime game code/mechanics. To implement AI I would just use my Map&Nav package with this since that knows how to handle nodes and such.
     
  39. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    314
    I just updated the TileSet model package from BitGem, and it completely scrambled my tilemaps, using floor tiles I didnt even add to my prefabDB (like the brown tiles). I'm sure it has something to do with how the maps were already corrupted.

    I'm kind of afraid to continue using the tool, because the amount of time it takes to decorate a single map section is not time I can afford to waste on the maps getting corrupted.

    I hope you can find an answer soon, because the concept of this tool is very useful...
     
    Last edited: Mar 13, 2013
  40. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    I'll PM you to find out the exact things you did so I can trace what went wong.

    [edit] I thought this might be it and did a quick test ...
    I've just duplicated that error message by deleting the prefabDb prefab after making a map. When I then hover over the map I get the same nullref error at the exact same line, which makes sense since the error is that either your prefabDb is missing or a specific tileset in the db is missing.

    Code (csharp):
    1.  
    2. if (ed_selectedSet < Target.db.tiles.Count  ed_selectedSet >= 0  ed_selectedTile >= 0)
    3.  
    There is not much that can be done to fix this since the connection of the prefabDb is now lost. The reason the tiles work in-game is cause they are just gameobjects that have been placed in the scene and the Tile Ed do not concern itself with them after that. - its only work is during edit time.
     
    Last edited: Mar 13, 2013
  41. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    314
    The prefab DB and the assets were never touched. they remained in the scene. The only thing that changed was that I made prefabs of the maps then deleted them from the scene, then after a few weeks, when I put them back in the scene, they did not work, even though the prefab db was there and unchanged.

    Have you tried doing this with the maps?
     
  42. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Yes, minus the waiting a few weeks :)
    I made a db and made it into a prefab. Then deleted it from the scene so I edit only the prefab version of it. Then I created a map and specified the db (that is now a prefab). Added some tiles, made the map into a prefab and deleted the map in the scene. Draged the scene back into the scene and could continue editing.

    How I did manage to break it was when I made a db in the scene and then a map and specified the db that is in the scene as the one to use, then made the db into a prefab and deleted from the scene. That was it and the error would start, but to take it further you could make the map into a prefab to and delete it from the scene and when dragging it back in you would see the errors. You will also see an error when you click on the map prefab in the project panel. I think you might have done this since you said you did not do an update which is the only other thing I can think could have broken the prefabs - if you accidently overwritten the DLLs with the wrong unity version ones.
     
  43. wokka

    wokka

    Joined:
    Jan 14, 2013
    Posts:
    7
    Hi. Is there an easy way to swap tile prefabs? I have a simple map using the provided terrain tiles and wanted to see what it looked like if I swapped to the provided dungeon tile prefabs. I looked in the PrefabDB interface and saw that I could swap prefabs in my sets. I didn't see a way to update a map with changes to the tile sets. Is there a way to accomplish this without repainting the map with the updated tile set?

    Sorry if this has been answered been answered -- I skimmed the thread and the documentation, and didn't find the answer. Thanks.
     
  44. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    The only way I can think of is to open the PrefabDB and then drag the new tiles into the slots of the old ones for each tile set. Swapping a while TileSet is not possible and I would not recommend (and did not make available) swapping a prefabDB since you are looking at lotsa errors if the new one don't have the exact same tile sets and tile counts as the previous one.
     
  45. rexxthunder

    rexxthunder

    Joined:
    Aug 25, 2012
    Posts:
    32
    I just installed UNI-RPG on my copy of Unity 4.1 for the first time. I've used this on 3.5 and it worked fine. I did the unzip for Unity 4. Now when I try to select a prefab in the Prefab Database is claims none of the prefabs are valid. I'm attempting this with the demo prefabs from the kit. Anyone else run into this?
     
  46. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    You first need to turn them into Tile Pieces that the PrefabDB can understand since they are just simple art prefabs atm. Simply select the tiles in the project panel and then from the Component menu you select TilePiece to place that component on them and they will be ready or use in the PrefabDB.
     
  47. wokka

    wokka

    Joined:
    Jan 14, 2013
    Posts:
    7
    If I do drag new tiles into the slots of old tiles, is there a way to get a map to refresh so it reflects the changes to the existing PrefabDB? Thanks.
     
  48. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Sorry, no. But I 'll check if I can't hack something together later today.
     
  49. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Submitted update 1.8 with feature request.

    * Added a new features which allows updating tiles in the open scene after you amde an update to a tile set. usefull for when you want to replace existing tileset with new art. The feature will be find in the prefabDb as a new button called "Update Placed Tiles" when a set and tile definition is selected
     
  50. wokka

    wokka

    Joined:
    Jan 14, 2013
    Posts:
    7
    Awesome. Thank you.
     
Thread Status:
Not open for further replies.