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. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    That is strange. I actually noticed the same thing in my one demo scene and then I removed all tiles to try and paint and see if it happens again and can't reproduce it so I don't know under what conditions it can happen.
     
  2. Thecle

    Thecle

    Joined:
    Aug 6, 2012
    Posts:
    13
    It appear if you update an already created scene and you keep the mouse button pressed to paint again.

    Updated map show this red error when clicked :

    Code (csharp):
    1.  
    2. ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
    3. UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) (at C:/BuildAgent/work/812c4f5049264fad/Runtime/ExportGenerated/Editor/GUILayoutUtility.cs:164)
    4. UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/812c4f5049264fad/Editor/MonoGenerated/Editor/EditorGUI.cs:3964)
    5. UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/812c4f5049264fad/Editor/MonoGenerated/Editor/EditorGUI.cs:3960)
    6. UniRPGEditor.MapInspectorBase.OnInspectorGUI () (at d:/work-dev/Unity AS/UniRPG Tile Ed (Unity 4)/_UniRPG_Assemblies/UniRPGEditor/MapInspectorBase.cs:382)
    7. UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/Inspector/InspectorWindow.cs:863)
    8. UnityEditor.DockArea:OnGUI()
    9.  
    And this warning :

    Code (csharp):
    1. Unexpected top level layout group! Missing GUILayout.EndScrollView/EndVertical/EndHorizontal?
    2. UnityEditor.DockArea:OnGUI()
    3.  
    Alexandre.
     
  3. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    That error can be ignored.

    I'll see if I can reproduce the duplicate tiles with the proccess you described. If I can reproduce it I can fix it :)
     
  4. Thecle

    Thecle

    Joined:
    Aug 6, 2012
    Posts:
    13
    Try to create the first map with a previous version of the editor, if you have a versionning backup. It will reproduce better i guess. Then update the tool and return to your map :)
     
  5. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    I've tried by making a map, closing unity and opening the project again to edit it and could not create duplicate tiles again ( this was al ldone with latest version of UniRPG).

    I can't really fix any problems that might exist between the prev and this version since they use different ways to spawn the tiles. I'm guessing the system now do not recognise the previous tiles as valid and "in the way". The best I can suggest is to either remove all tiles so you can start fresh else use the right-click drag to delete the old tiles before painting in new ones.
     
  6. Thecle

    Thecle

    Joined:
    Aug 6, 2012
    Posts:
    13
    Well, i have only 12 levels left to redo on the 32, your tool is such a time saver than i can afford this time lost to gain the full prefab construction !
     
  7. Thecle

    Thecle

    Joined:
    Aug 6, 2012
    Posts:
    13
    [edit]

    i though with new db and map i would not have the issu, but even with a new prefabdb and a new map, it's stiill occuring. So long, i'll keep manually removing them. Its always better than putting tile by tile in unity :)

    Perhaps try using a 2x2 brush, it seem to come from there a lot ?

    Edit 2 : sometime the system does not put prefabs but clones, and the pillar are nearly always clones in tile mode.
     
    Last edited: Jan 10, 2013
  8. Thecle

    Thecle

    Joined:
    Aug 6, 2012
    Posts:
    13
    (sorry for the spam, i add a reply so the post owner is informed of the recent change to the thread).

    Hello,

    I made some test, i'm not 100% certain but here's what my test seem to show :

    - The double walls are created when using 2x2 or more brush in autotile mode. This issue was already present in the last update.
    - When removing wall with right clic, this will lead to new walls and corner creation to update the boundary of the level. Those new corner/pillar created by the right click action of removing old floor will lead to a gameobject clone instantiation instead of a prefab instantiation.

    Bests,

    Alexandre.
     
  9. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Thanks for your help. The brush size thing helped and I finally found the real culprit! There was an old two-pass system still in place which should not be there since I changed the way the tile placement calculations works a while ago.

    I've also fixed a problem where the auto-tile tool would still create tiles (walls/pillars/corners) that are not linked with the prefab when you used right-click to delete tiles.

    Expect update 1.5b soon.
     
    Last edited: Jan 11, 2013
  10. Thecle

    Thecle

    Joined:
    Aug 6, 2012
    Posts:
    13
    I made a small script to help people to replace the props (clone) with props (prefabs).

    Simply save addmultichilds.cs in an "editor" folder of the project assets, select the list of plops to replace by a prefab, open the window and put the prefab you want to put in and replace as "child".

    Not sure it will help lots of people, but i get bored to add multichilds to object, set them the same transform and extract them...

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using UnityEditor;
    4. using System.Collections;
    5.  
    6. public class addmultichilds : ScriptableWizard {
    7.     public bool SetParentSize = true;
    8.     public bool moveToParentParent = true;
    9.     public bool destroyParents = false;
    10.     public GameObject[] Childs = new GameObject[0];
    11.     public GameObject[] Parents = new GameObject[0];
    12.     private GameObject instance;
    13.  
    14.     void OnWizardCreate() {
    15.         if (Parents.Length<1) return;
    16.         if (Childs.Length<1) return;
    17.          for (int i = 0; i < Parents.Length; i++) {
    18.             for (int j = 0; j < Childs.Length; j++) {
    19.                 instance = PrefabUtility.InstantiatePrefab(Childs[j]) as GameObject;
    20.                 instance.transform.parent = Parents[i].transform;
    21.                 instance.transform.localPosition = new Vector3(0f, 0f, 0f);
    22.                 instance.transform.localRotation = new Quaternion(0f, 0f, 0f, 0f);
    23.                 if (SetParentSize)
    24.                     instance.transform.localScale = new Vector3(1f, 1f, 1f);
    25.                 if (moveToParentParent)
    26.                     instance.transform.parent = Parents[i].transform.parent.transform;
    27.             }
    28.          }
    29.          if (destroyParents) {
    30.             for (int i = 0; i < Parents.Length; i++) {
    31.                 DestroyImmediate(Parents[i]);
    32.             }
    33.          }
    34.     }
    35.    
    36.     void OnWizardUpdate() {
    37.     }
    38.    
    39.     [MenuItem("Tools/Multichild")]
    40.     public static void ShowWindow()
    41.     {
    42.         addmultichilds thismulti = (addmultichilds)ScriptableWizard.DisplayWizard("Multichild Insert", typeof(addmultichilds), "Insert !");
    43.         if (Selection.gameObjects.Length>0)
    44.             thismulti.Parents = Selection.gameObjects;;
    45.     }
    46.  
    47. }
     
  11. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Check out this new pack that works with UniRPG.
     
  12. Va.OS

    Va.OS

    Joined:
    Jan 13, 2013
    Posts:
    1
    Hi,
    I've got a little problem... I'm using Unity 4 with UniRPG, after extracting the files in the for_unity4.zip archive i get the UniRPG menu and could create a prefab. Now my problem is, that all the stuff that should show up in the inspector (for example the edit prefabDB button) or the Map Inspector/ Painting Tiles stuff doesn't show up =/
     
  13. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    What error messages are you getting in the conosle? It is important to always check that first and to copy-paste it when you report a problem, else I (and any other dev) can't tell what the problem is.
     
  14. DeadPoet

    DeadPoet

    Joined:
    Jan 7, 2013
    Posts:
    5
    Hey,

    I have a very stupid question, is there any option to undo the last action? For example when I placed a tile twice and want to undo the 2nd placement, at the moment I always need to select the tile by hand and delete it, which is quite annoying (control + z / undo are not working). Would be very nice to have a small hint for my problem. :)
     
  15. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    There is no support for undo.
    You can prevent duplicate tiles in the same spot by turning on the option, "Replace Existing" in the inspector. You can also right-click on a tile to delete an existing tile.

    If you are refering to the auto-tile placing a 2nd wall piece when you use a brush of size 2 or bigger then grab the latest update of UniRPG Tile Ed since that was a bug which has been fixed.
     
    Last edited: Jan 14, 2013
  16. DeadPoet

    DeadPoet

    Joined:
    Jan 7, 2013
    Posts:
    5
    I updated UniRPG and now I have the problem that my existing Tile/Auto-Tile and Plop Sets are still showing by name but are completely empty. They seem to work, at least the 1st tile which was in every set (I can't see them anymore in the Inspector). When i try to edit the PrefabDB I get the following error:

    MissingMethodException: Method not found: 'UnityEditor.EditorUtility.GetAssetPreview'.
    UniRPGEditor.PrefabDBTilesEditor.DrawTileSetSelectionBar () (at d:/work-dev/Unity AS/UniRPG Tile Ed/_UniRPG_Assemblies/UniRPGEditor/PrefabDBTilesEditor.cs:232)
    UniRPGEditor.PrefabDBTilesEditor.DrawRightPanel (UnityEditor.EditorWindow win) (at d:/work-dev/Unity AS/UniRPG Tile Ed/_UniRPG_Assemblies/UniRPGEditor/PrefabDBTilesEditor.cs:191)
    UniRPGEditor.PrefabDBTilesEditor.Render (UnityEditor.EditorWindow win) (at d:/work-dev/Unity AS/UniRPG Tile Ed/_UniRPG_Assemblies/UniRPGEditor/PrefabDBTilesEditor.cs:35)
    UniRPGEditor.PrefabDBEditor.OnGUI () (at d:/work-dev/Unity AS/UniRPG Tile Ed/_UniRPG_Assemblies/UniRPGEditor/PrefabDBEditor.cs:96)
    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)
    UnityEditor.HostView:OnGUI()
     
    Last edited: Jan 16, 2013
  17. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    "UnityEditor.EditorUtility.GetAssetPreview" means you are using Unity 4 and did not extract the DLLs that where compiled for Unity 4 or did not extract them correctly. Please make sure that you extract them to the correct locations. You are supposed to overwrite the existing DLLs which are for Unity 3.5

    from the documentation ...

     
  18. DeadPoet

    DeadPoet

    Joined:
    Jan 7, 2013
    Posts:
    5
    Damn I was so blind... Thank you! :3 Keep up your work.
     
  19. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    110
    Hi,

    I'm trying to use the latest update of UniRPG in Unity4. I've extracted the for_Unity4 files to the appropriate locations and proceeded to follow the tutorial pdf.

    I created a prefabdb, added a tileset with a single tile to it, created a map, selected the map object to enter edit mode. The problem is, once I click on the map grid in the scene window I get this exception every time:

    ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index
    System.Collections.Generic.List`1[UniRPGRuntime.DefAutoTileSet].get_Item (Int32 index) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    UniRPGRuntime.MapUtil.PlaceTile (UniRPGRuntime.Map map, Int32 x, Int32 y, Int32 floorLevel, Int32 setIdx, Int32 tileIdx, Boolean replaceExisting, Direction faceDirection, Int32 brushSize, Boolean fromAutoTiles, Kind pieceType) (at d:/work-dev/Unity AS/UniRPG Tile Ed (Unity 4)/_UniRPG_Assemblies/UniRPGEditor/MapUtil.cs:149)
    UniRPGEditor.MapInspectorBase.PlaceTile (Int32 x, Int32 y, Boolean place) (at d:/work-dev/Unity AS/UniRPG Tile Ed (Unity 4)/_UniRPG_Assemblies/UniRPGEditor/MapInspectorBase.cs:1262)
    UniRPGEditor.MapInspectorBase.OnSceneGUI_Editor () (at d:/work-dev/Unity AS/UniRPG Tile Ed (Unity 4)/_UniRPG_Assemblies/UniRPGEditor/MapInspectorBase.cs:1202)
    UniRPGEditor.MapInspectorBase.OnSceneGUI () (at d:/work-dev/Unity AS/UniRPG Tile Ed (Unity 4)/_UniRPG_Assemblies/UniRPGEditor/MapInspectorBase.cs:944)
    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)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    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)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Applications/buildAgent/work/3df08680c6f85295/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.SceneView.CallOnSceneGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/SceneView/SceneView.cs:1335)
    UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/SceneView/SceneView.cs:839)
    UnityEditor.SceneView.OnGUI () (at C:/BuildAgent/work/812c4f5049264fad/Editor/Mono/SceneView/SceneView.cs:728)
    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)


    Any ideas?

    Thanks in advance.
     
  20. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    It is a bug. For now, please create an auto-tile set too for every normal tile set you make (it can be empty). I'll fix it and submit an update later today.
     
    Last edited: Jan 17, 2013
  21. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    110
    Yup, that fixed it, thanks!
     
  22. DeadPoet

    DeadPoet

    Joined:
    Jan 7, 2013
    Posts:
    5
    I have another small thing that I noticed:

    I created 8 tile sets (and empty auto-tile sets for em ;) ) - everything is working fine. I changed the textures for the tiles later, but the tile preview are still showing the old version. When I go and set prefab to tile or plop again after the textures were changed the preview is updated correctly. I guess there is a small "bug" around which keeps the preview from updating.

    Just saying. :)

    /e: 8 tiles ets with 11 tiles / set are a lil too much for the unity previews it seems, half of 'em is not shown or flickering while scrolling. Evil unity. :>
     
    Last edited: Jan 17, 2013
  23. sburgoon

    sburgoon

    Joined:
    Jan 29, 2012
    Posts:
    38
    Awesome tool. I was about to write my own version before I stumbled on UniRPG, and this has saved me a ton of time. I had two general feature requests that I was going to build into my own, and one minor request that would make the system easier to write tools for (though I may just be missing something).

    First, I feel like placed tiles should keep track of whether they are autotiles or not, because right now they have their set and tile indexes, but there doesn't seem to be a way to easily determine whether they were autotiles or not. I'm working on a copy/paste tool for unirpg, for my own purposes, and having that seems pretty necessary. I added it to the source and rebuilt, so no rush, but I'd like to have as few if any custom additions to your code in the version I am using as possible. Also, if there's a better way to determine this from existing placed tiles, let me know.

    That leaves the feature requests:

    One, copy/paste or the ability to move groups of tiles around. I know I said I'm writing a tool for that, but I have a million other things to do, so my guess is I will likely never get to it. If you are looking for features to add, that would be awesome, as wanting to shift rooms around and not lose any detailing you've done with non-auto-tiles seems pretty common, or just straight up duplicating them and placing them somewhere else. Obviously you can do that now, but you lose their connection to the tilemap, and keeping that would be ideal.

    Two, layers. This is a big request, but I think would take unirpg to a whole other level. It's what I was going to base my tool on, but since yours is so close to what I wanted, and so well made, it seems dumb for me to write my own now. So, instead, hopefully if you get the chance you'll put something like this into yours ;) What I mean by layers is, on a single map, let me have multiple layers to paint. The important part is to be able to set those layers as additive or overwrite. That way, I can have a base-layer of autotiles, a layer above it set to overwrite for things like door-tiles that should replace the underlying auto-tiles, and a layer above that set to additive that I place independent tiles on. This way I can repaint the autotiles layer to my heart's content non-destructively. I may actually just add that myself, since you were kind enough o include source, but since you will inevitably know your code better than I will, if you have any interest at all in adding that functionality I'd rather hold off and not spend the time learning the code base.

    Anyway, that aside, absolutely awesome tool.

    -Sean
     
  24. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    You can get rid of the balnk sets now. The latest version is now online and fixes that bug.

    The previews are cached so the images won't update if you changed the texture until a restart of unity or until the cached image is lost somehow. I have to cache else previews will glitch a lot in the inspector.
     
  25. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    I've added a new variable TilePiece.fromAutoTileSet which can be used (in next update v1.6). I've checked but there is not really a way to check existing tiles cause testing the object on the map against the objects in the db don't give the results needed to figure out which tile set the piece came out of.

    for Update 1.6
    I've also added a copy-paste feature to allow copying and pasting tiles and keeping the linking with the map object
    and added the ability to collapse tile-sets in the inspector view so that they take up less space when not in use.
     
  26. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,329
    Hello, I have trouble :)

    I just purchase latest UniRPG Tile Ed 1.5c and the Dungeon Builder Starter Set from BITGEM. I followed your turorial video at http://www.youtube.com/watch?v=H9aXYiPAQxU . So far so good. I import Dungeon assets, I give them the Tile Piece Component but when I try to put them into UniRPG into the FLOOR / WALL / PILLAR Section, The PrefabDB windows goes blank and nothing happend. The Windows goes non responding. I cant insert the Elements to the PrefabDB. Unity Version 4. I followed documentation and switched files for unity 4. in the editor.
     
    Last edited: Jan 21, 2013
  27. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Are you getting any error messages in the unity console? Please post 'em here if you do as I can't really tell what the problem is by your description.
     
  28. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,329
    Iam getting a lot red..

    MissingMethodException: Method not found: 'UnityEditor.EditorUtility.GetAssetPreview'.
    UniRPGEditor.PrefabDBAutoTileEditor.DrawTilePieceInfo (System.String name, UnityEngine.Texture2D icon, UnityEngine.GameObject tilePiece) (at d:/work-dev/Unity AS/UniRPG Tile Ed/_UniRPG_Assemblies/UniRPGEditor/PrefabDBAutoTileEditor.cs:697)
    UniRPGEditor.PrefabDBAutoTileEditor.DrawDungeonAutoTileEditor (UnityEditor.EditorWindow win) (at d:/work-dev/Unity AS/UniRPG Tile Ed/_UniRPG_Assemblies/UniRPGEditor/PrefabDBAutoTileEditor.cs:354)
    UniRPGEditor.PrefabDBAutoTileEditor.DrawRightPanel (UnityEditor.EditorWindow win) (at d:/work-dev/Unity AS/UniRPG Tile Ed/_UniRPG_Assemblies/UniRPGEditor/PrefabDBAutoTileEditor.cs:259)
    UniRPGEditor.PrefabDBAutoTileEditor.Render (UnityEditor.EditorWindow win) (at d:/work-dev/Unity AS/UniRPG Tile Ed/_UniRPG_Assemblies/UniRPGEditor/PrefabDBAutoTileEditor.cs:38)
    UniRPGEditor.PrefabDBEditor.OnGUI () (at d:/work-dev/Unity AS/UniRPG Tile Ed/_UniRPG_Assemblies/UniRPGEditor/PrefabDBEditor.cs:97)
    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)
     
  29. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Please extract the DLLs that are compiled for Unity 4 as per the documentation.

     
  30. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,329
    I did that step. But I try again with new project.
     
  31. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Make sure you extracted correctly and overwrite the existing DLLs since you will only get the error "UnityEditor.EditorUtility.GetAssetPreview" if you are still using the older DLLs with Unity 4.
     
    Last edited: Jan 21, 2013
  32. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,329
    Thanks, I did I again with a new Project and now it works. Awesome Project!
     
  33. sburgoon

    sburgoon

    Joined:
    Jan 29, 2012
    Posts:
    38
    Excellent, thanks for adding those things to the upcoming 1.6. The more I use this tool the happier I am with it :)
     
  34. sburgoon

    sburgoon

    Joined:
    Jan 29, 2012
    Posts:
    38
    One other minor request if you can get it in for 1.6, assuming its simple enough. For ploppables, if you have "Snap height to colliders" checked, is it possible to mask out the colliders to the ones in layers that are visible in the editor panel? I believe that's how Unity's internal snapp to collider functionality works. I use large box colliders (triggers) to define rooms, and so whenever I turn that on it just snaps to the ceiling, regardless of whether those are visible or not.
     
  35. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    I've added a layer mask field so that you can select the layers that wil be checked against. I can't exclude the colliders that is not visible since I'm just using raycasts. This will be in update 1.6b.
     
  36. sburgoon

    sburgoon

    Joined:
    Jan 29, 2012
    Posts:
    38
    That's perfect. You are an amazingly responsive developer :) I almost feel bad requesting things because you do them so fast. One other thing that I just thought of that would be really nice (again, no rush), would be a button to refresh all the tile prefabs. I'm not sure if its something I'm doing, but it seems like the prefab link gets lost on a random assortment of the tile objects, so it would be nice to be able to have unirpg just re-place all the tiles to get the latest prefab version. Like I said, no rush, just another little thing that crossed my mind.
     
  37. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Could you explain this better, like what do you mean with the links gets lost on a random selection? Perhaps this is a bug in UniRPG Tile Ed.
     
  38. Sonechko

    Sonechko

    Joined:
    Nov 8, 2011
    Posts:
    2
    I did some testing with smaller Maps and If you create multiple small maps 50x50 depending on your system. Just hide maps you not working on (Unity inspector uncheck check mark by name,above tag to hide object). it will help with slowing down while creating Large Levels.
     
  39. sburgoon

    sburgoon

    Joined:
    Jan 29, 2012
    Posts:
    38
    Yeah, the simple explanation is, when I open up the map group in the scene hierarchy, and look at the tile objects, a lot of them are grey instead of blue, and have completely lost their connection to their original prefab, meaning there isn't even the option to "revert/apply/select" like on a prefab that has just been changed. I looked into it more, and I discovered it happens when erasing auto tiles. If you paint down a group of autotiles, then go through and erase part of it with the right mouse button, some of (maybe all) of the adjusted pieces lose their prefab connection. I believe its when you erase a floor tile, and it has to update the adjacent tiles to add walls, those walls end up without the connection.

    Possibly a related bug, but I've also found that sometimes tiles lose their connection to the tilemap, so while are visible and still in the group, you can't erase them with right-click anymore. I haven't found a repro step for that yet, it just seems to happen, but I have found that its only non-auto tiles, and I believe only linked tiles. Say I remove an autotile wall, and add a non-autotile wall with door piece, and then the same piece again rotated 180 degrees. That first door tile seems to stay working fine over time, but the second one (which I believe is a linked tile) somehow ends up having to be manually deleted (the actual game object) later some times, even if right-click does remove the main tile. Like I said, this one I can't consistently repro, and I have a hunch (not based on anything, just a guess) that they're related, so if you can fix the first one I'll do some more testing and see if this one even still happens.

    -Sean
     
  40. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    sburgoon, update to the latest version. The tile removing losing links has been fixed in 1.6. I'll see if I can reproduce the 2nd issue.
     
  41. sburgoon

    sburgoon

    Joined:
    Jan 29, 2012
    Posts:
    38
    1.6 definitely fixed the first issue. I'll let you know if I run into the second again (haven't yet).

    The new copy/paste tool isn't working for me though. When I go into selection mode and start painting, the shape I'm painting is selected (colored white), but not in the right place. It almost looks like its painting on a shrunk down version of the map up near the origin. If it's relevant, my tile-size is 5, height 10. I tried a few map-sizes. I'll dig in a little later and see if I can figure out why that's happening, or any more specific info.

    Update:
    Looks like the copy/paste works, but the feedback is in the wrong place. If I am extremely careful to select what I think I'm selecting, then paste, it works as expected, just the highlighting that seems to be off (for both copy and paste mode)
     
    Last edited: Jan 24, 2013
  42. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Thanks, I forgot to test with different size tiles than 1x1, wil lfix it.
     
  43. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,883
    I am getting the error "Not a valid TilePiece prefab" when I try to create an auto-tileset. I have tried with the prefabs from both packs that were recommended - the bitgem dungeon builder, and the crypt dungeon set. I am using unity 4.01, and have extracted and overwritten the DLL's that were included in the Zip file.

    Can you tell me what makes a TilePiece a valid prefab? Are they missing some script or something? How do you validate what is valid?

    Edit: It's not mentioned in the documentation (unirpg_ed_doc.pdf), but this is solved by adding a "TilePiece" script component to the prefabs. Would probably be a good place to mention it. Having fun creating dungeons now.
     
    Last edited: Jan 26, 2013
  44. gaweph

    gaweph

    Joined:
    Sep 2, 2012
    Posts:
    26
    Hello,

    Not sure where to post this, seems like the correct place. I have a feature request that I thought I would throw in for you to consider if your ever thinking of things to improve or add.

    The feature would basically group the map children into a better structure. For example, all floors could be in a child called -Floor, Walls could be in -Wall, and so on.

    E.G.

    Map
    -Floor
    floor01
    floor02
    -Walls
    wall01
    wall02

    This would make it a lot easier after creating a map to place the objects into correct layers, this would be really helpful for things like the A* pathfinding project, where the floor and walls require separate layers fo the pathfinding to generate the mesh correctly.

    Another option would be to have the option to specify a layer for each item when setting up the prefabDb. However I feel that the child grouping would be better, as it would also be helpful to add other things in bulk to all floors, or walls, or props etc...

    Please let me know if this requires further explanation, not sure if anyone else feels this would be helpful, just wanted to put it up.
     
  45. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    You can set the Layer for the Tile prefab to whatever you want (before or after adding it to the PrefabDb). Painting the tiles just instantiates the prefabs, keeping any layers you might have set to them.

    The structure you suggest does seem like something that could be usefull. I'll add it as an option to the next update if it won't cause too much trouble in the existing code. I'm afraid that it might conflict with something that assumes the tiles will be directly under the parent, but I needa look over the code again to make sure.

    [edit] Rather use the method I described. Set the layers on the prefabs. While I can add the described feature I can not make it reliable as the system will not know what to do about normal tiles when you start painting those and they can have too many meanings, like being a floor, wall, door, ramp, etc.
     
    Last edited: Jan 29, 2013
  46. gaweph

    gaweph

    Joined:
    Sep 2, 2012
    Posts:
    26
    Thanks for the fast reply.

    Yes, you are right about the layer on the prefab. I think I was getting the previous error of my map containing objects that were no longer linked to their prefabs. Since this is resolved, then it is a non issue I suppose.
     
  47. Woolf

    Woolf

    Joined:
    Dec 4, 2012
    Posts:
    22
    Hello. I have problems
    I have an error when trying to set tile





    how can I solve this problem?
     
    Last edited: Feb 2, 2013
  48. alex-taras

    alex-taras

    Joined:
    Feb 2, 2013
    Posts:
    4
    Hi, I'm also getting errors when trying to replace wall tiles:

    ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
    UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) (at C:/BuildAgent/work/14194e8ce88cdf47/Runtime/ExportGenerated/Editor/GUILayoutUtility.cs:158)
    UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/MonoGenerated/Editor/EditorGUI.cs:3867)
    UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at C:/BuildAgent/work/14194e8ce88cdf47/Editor/MonoGenerated/Editor/EditorGUI.cs:3863)
    UniRPGEditor.MapInspectorBase.OnInspectorGUI () (at d:/work-dev/Unity AS/UniRPG Tile

    Also, i've bought the BITGEM pack and followed your tutorial. However i'm getting a strange effect: tiles places in some directions have small gaps between. Not sure it's bitgem or unirpg but please look at the screenshots below and let me know if you have any idea:

    Floor Gaps
    Wall Gaps

    using latest 3.5.7f Unity.

    Thanks
     
  49. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    Thanks for spotting that. I'll submit an update soon but since it is weekend you can probably only expect on Thuesday (USA time). If you wnat to compile the DLLs yourself then make this change and compile ...

    In MapInspectorBase.cs, change the if() statement on line 1314 to ...
    Code (csharp):
    1.  
    2. if (Target.kind == UniRPG.MapKind.Dungeon  selectedTool == ToolTypes.Tiles  ed_selectedSet < Target.db.autoTiles.Count  autoTilesSelection)
    3.  
     
  50. Leslie-Young

    Leslie-Young

    Joined:
    Dec 24, 2008
    Posts:
    1,046
    You can ignore that error. I'm having a hard time tracking it down but it is not critical at all.

    I'll ask BITGEM for a copy of their package's latest update to see if I can find out what is going on there. It can either be that the tile art is nto exactly 1x1 or that the pivot is not at the correct position.

    [EDIT] I'm submitting v1.7 which icludes the bug fix from previous post and also a change to the directory structure to prepare for my future project. This should not affect anyone and I don't think you will even get the new directory name if you update, but you can manually change "UniRPG" to "UniRPG TileEd" if you like.

    [EDIT2] @alex.taras, BITGEM will be releasing an update to that pack but they say for now you can check if yo ugot "clamp" (not repeat) set for the textures of those walls and floors.
     
    Last edited: Feb 2, 2013
Thread Status:
Not open for further replies.