Thanks! Ill check this out as soon as I can. We have recently been looking for a good tile editor, I will see how this compares to Rotorz tile system which we are currently using.
Hey, first of all I wanted to thank you for providing this for free, I have used it and it is just very simple yet very powerful. I have one question though, how do I 'Undo' an action, I read it's there in the feature list but I can't figure out how to do it. Thanks and keep up the good work
Yes thanks it definitely helps, but there is another thing, I don't know if it's a bug or just a limitation. The thing is (after testing a bunch of stuff) it seems that if a sprite sheet has a big number of sprites in it it gives an "Index out of range exception". I noticed that when the number of sprites go above 60 to 80 sprites some of the sprites become invisible in the preview window in the inspector. I go even higher, at around 100 sprites, it gives me this out of range exception, I would really appreciate it of you could look into it. All the best
Hmm, that's weird because before I posted last time I did actually try changing the size of the array but I kept getting the exception, now even after I downloaded the new version changing the size of the array to no matter what doesn't help with the exception. I took another quick look at the loops and the arrays but everything seems to be just fine, I think I'll need to dig a bit deeper. I'm a bit busy but if I find anything I'll let you know and I'll try to be of some help, that is in case you don't mind me doing that with your code. Edit: By the way I noticed you require the pixels to units to be 100 and if I'm right it's what you are using when dividing by a hundred in your code. If you would like to remove this requirement and allow the pixels to units to be anything you can just use this line of code (maybe with a bit of editing) to get the pixels to units value and then you can use the variable anywhere needed in your code. Here it is: Code (CSharp): float pixelsToUnits; //Get pixels to units pixelsToUnits = GetComponent <SpriteRenderer>().sprite.textureRect.height/ GetComponent <SpriteRenderer>().sprite.bounds.size.y;
No problem at all, take your time The new update is great fixes all the previous problems, good work . Also good catch about the pixels to unit issue, I didn't think about having different size of tiles in the same tilesheet, but I guess it could happen. Keep up the good work and all the best
Hey, I have added the feature to decide which sorting layer tiles you add get placed on. I have made a fork and updated the scripts and made a pull request on Github. So if you can check it out and see if you will add it, I hope you like it and find it useful Edit: I also have added the ability to choose a material and apply it to newly added tiles, it should be very helpful especially if the user works with many different materials.
i tried the experimental controller on your asset, but my character keeps on falling through. I am new to this program, sorry if I sound stupid lol.
Hi, Could you please explain what you mean a bit more. I'll try to help from what I understand, so you tried the experimental 2d controller provided by unity and your character is falling through? If that is the case, then just make sure you add a collider to the tiles, because these tiles are just sprites, they don't collide, so you need to put a collider. Now there are two ways of doing this, one is either you make a new empty game object and but a 2d collider in it and stretch and place it where ever you have tiles you want to collider with, or you could just tick the box saying 'Add collider' and choose a collider type (you will probably use a boxcollider2D). Now newly placed tiles will automatically have a collider on them so you won't fall through. Hope that helped
Hey @Hexusreaper, I pushed a critical update regarding a bug that stopped builds! I noticed it today and fixed it right away, it was a simple fix, though important, I hope you can merge it as soon as possible Note: Further info about it is in the description of the update I pushed
Not at all, I'm glad to be of help About the fix, sorry it was my mistake haha, I forgot to create a pull request, but it should be there now so you can check it out.
Hey @Hexusreaper , I have been thinking of the possibility of making it possible to move already placed tiles around, while keeping the place/remove system working correctly. By moving I don't mean making a move system, but simply allowing you to choose the tiles you want to move normally and moving them, this is useful because lets say you made some kind of a structure but now you want to move it else where you could just do it, but currently this would require you to remove it and remake it elsewhere, which is a pain and could mean redoing a lot. The current problem is how the add/remove system works, it works by using positions, but this won't work if we will do this, what I have been thinking about is instead, using raycasting to get the name of the tiles and using that to remove them, which won't require much editing to the delete method. The problem with that is that tiles don't normally have colliders on them, so raycasting won't work. A possible solution I thought about is that we automatically add a collider to every tile placed, even if no colliders are wanted, and for tiles that the user wants colliders with, we add the colliders he wants and we change the object tag of those tiles to "EditorOnly", a tag found by default that will always be there. Then on runtime, we loop through all the tiles, the ones where the tag isn't "EditorOnly" will have their colliders removed as the user didn't want colliders there, and the rest will maintain their colliders and then call the GC to deal with all the deletes we made. This might seem slow (and it probably is) but I don't think it will be a problem since it is done only once at the very beginning of the game, making its effect (if any) invisible. I think I'll do this as I feel that I'm needing such a thing , but I would like to hear from you on whether you think such a thing should be added to the package, if so I could make a pull request when I'm done with it. Sorry for the long post Edit: I have finished implementing the changes! though not everything is done as I explained. I managed to do without messing with tags and now I loop only through tiles which need their colliders removed, but the main concept remains the same and works without any problems.
No problem at all, take your time. I'm very happy you liked the idea, and since you agreed to the addition, I'm going to create a pull request, so you can review the code as you like and merge it if you feel it is good enough. I love your idea of creating presets, it would be really cool, though depending on the way we implement it we might need to redo a lot of things. But I have an idea of probably a way we could do it without altering the core system (at least not too much ) A simple way might be to let the user select any group of tiles he wants to add to a preset, then he presses a button, we can take all those objects and parent them to a new object the user names, then add that object to the preset list (or whatever we might have). That's as far as creating them goes, though I'm not too sure of getting presets, it could be simple, we could just retrieve the tiles from the parent object once it is released in the scene, and parent them to our default prefab, though the only thing I'm not too sure of how to do is how to snap the tiles to the grid, if we could snap like to the nearest square then the process should theoretically, at least to some extent, be simple. I would like to hear what you think of such an implementation for presets.
Glad that you liked the update Sorry if I gave the wrong idea, but I didn't plan on making a move system, as I wrote in an earlier post, the plan was to give the user the freedom to just come and select a bunch of tiles and move them without worrying about the script breaking, there is no move system, just the freedom to move, I'm sorry if you were disappointed. Good luck with the preset system, gonna look forward to that
Does this support Unity 5? I'm having trouble seeing the tiles in the tile main script. Edit: Ok, I changed the sprite sheet and now it is showing correctly. The problem I was having is that it wasn't showing PNG purple when I clicked show tiles. Not sure if that was a bug or just me. Edit2: Okay, just tried the github version and I'm getting all kinds of errors trying to view the tile sheet in the inspector.
hi Hexusreaper i've bought your hexkit and its helpful but also, i got a problem using hexkit. i want to create hex grid isometric like this but its appeared gap in y axis. could you tell me how to fix this?? thanks. Spoiler: picture