Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

SpriteTile, a fast dynamic tile system (RELEASED)

Discussion in 'Assets and Asset Store' started by Eric5h5, Dec 11, 2013.

  1. phoric

    phoric

    Joined:
    Jul 21, 2016
    Posts:
    3
    I was wondering if Spritetile supports baked lighting? Realtime lighting seems to work fine, but when I try to bake the lights the light does not interact with the tiles.

    I set the light(s) to static, and set the sprite render material to Sprites/Diffuse. Is there a way to set the tile layers as static as well? Anything else I'm missing?

    Thanks for the asset!

    Edit: I just tried this on a regular sprite and baked lighting doesn't work there either. So I'm assuming light baking doesn't work on 2d objects in general.
     
    Last edited: Aug 9, 2016
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    I haven't tried that, but I suspect that you might be able to make it work with an appropriate shader, although that's beyond my knowledge.

    --Eric
     
  3. phoric

    phoric

    Joined:
    Jul 21, 2016
    Posts:
    3
    Thanks, yes I will look into using a shader for this purpose.

    Another question: I started experimenting with colliders and read the documentation on this, but noticed there seems to be no facility (unless I'm missing something) for editing the shape of the polygons for physics colliders, but rather it relies on whatever default shape that Unity generates automatically. I would like the ability to edit the shape of the polygons created for each tile. Is this possible or do you have any plans on implementing this?
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    It's already implemented; see page 8 in the docs regarding the use of custom colliders.

    --Eric
     
  5. Silverleaf

    Silverleaf

    Joined:
    Sep 19, 2013
    Posts:
    3
    Eric,

    I sent you an email from the StarScene website, but never got a reply so I'm not sure if you ever saw it. So posting the same question here:

    Question is:
    I have a scenario in my tile levels where I want to be able to assign basically GameObjects and/or Unity Scripts to enable custom behaviors when I collide with or tap on tiles in the level.
    It would be nice to be able to make this information tied directly to the Tile in SpriteTile as part of the level's file format. Is there a way I can add custom behavior to tiles (without just need to change the editor code to be custom on my own) I haven't seen a way to pull this off with SpriteTile 'as is'.

    I have solved the issue already, by basically creating a new level layer and then having special tiles like say, 'Storage Locker' icon tile that I plop on the special SpriteTile layer.
    Then I co-opt the Trigger field in the tile to indicate that it's an Index into an array of GameObjects that I've setup in a separate Unity level that gets loaded in parallel with the SpriteTile level and it calls the scripts on that game object when I dectect interaction with that tile in SpriteTile. At level load, once I hook up all the tiles to my GameObject array, I just delete that tile layer from memory so none of the tiles in that special layer are actually ever rendered. :) The tiles actually interacted with are the underlying graphical ones that are actually the bitmaps for say, the locker itself. Then I know those coordinates are associated with a GameObject.
    This works fine (it's clunkier than if all this was part of the SpriteTile Editor), but it's a side-by-side solution, rather than something I can directly edit into the Tile infos in SpriteTile, thus keeping everything all in one homogenous place and editor, being all in SpriteTile Editor.

    I'm trying to do all this without changing all the SpriteTile Editor .js code, because if I do, then every time you release a new version, I'll have to integrate all my changes. Bleh.
     
    Last edited: Aug 17, 2016
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    I didn't see your question, sorry. It's not really possible to assign scripts to tiles, since they don't exist as objects, but just a few bytes in memory. For now your solution is reasonable, until something else is in place.

    --Eric
     
  7. Silverleaf

    Silverleaf

    Joined:
    Sep 19, 2013
    Posts:
    3
    Yeah, and I think the fact that they are only a few bytes in memory is great - especially for mobile devices!
    So maybe the way I'm doing it is the only way it should ever be done.
    It's a little weird to use the Trigger field to mean different things in different layers, but probably no less weird than say adding yet another integer that say 'UserValue', as UserValue would also be just as arbitrary. ~shrug.

    Well, I'm fine with the way I'm doing it. All I have to do to match up the Tile trigger value to my GameObject array index is simply go in SpriteTile and read what I set the Trigger value to on that tile. It's not that bad.
     
  8. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    The trigger value is meant to be all-purpose, so feel free to use it for anything really.

    --Eric
     
  9. IDreamofIndie

    IDreamofIndie

    Joined:
    Dec 24, 2014
    Posts:
    38
    Is it possible to add any components to the tiles? I would like to use SuperFastSoftShadows Asset which requires a component to control shadow casting.

    Thanks
     
  10. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    As mentioned above, tiles aren't GameObjects, but on the other hand there is a pool of GameObjects that's recycled as needed. Possibly if you attached the component to all those GameObjects it would work, but that would depend on what the component does since the sprites are swapped out as needed.

    --Eric
     
  11. years1hundred

    years1hundred

    Joined:
    Sep 3, 2016
    Posts:
    7
    Hello! So I'm a very new developer who is still learning a lot of the ropes. As it is, I built a test level using SpriteTile, and I followed your documentation to get it to load within Unity. However, whenever I run the scene, it doesn't properly load the level, and I have no idea why. I've attached a screenshot to demonstrate what I mean.

    If you could give me advice on this, I would be immensely grateful.

    Thank you very much for your time!

    https://gyazo.com/13671155c76fd483a9c8efef282e4ace
     
  12. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    Hi, I'm not sure what you would like the level to look like; can you give me some details about what the issue is?

    --Eric
     
  13. siegeon

    siegeon

    Joined:
    Nov 23, 2010
    Posts:
    81
    Evening Eric.

    I have been loading my dungeons in 8x8 chunks. By this, I mean that I create a level that is 8x8 and save it. Then when generating the dungeon, I render these levels as cells. I think doing this has confused the mechanism that toggles sprites because now the cells to the right and top render MUCH further out then they should. Notice in image one the cut off for the cells on the left. Now see when I move to the left in image two the cells on the right render far too long. Eventually, they do stop rendering. The cells on the right render for 75% more distance than the one on the right.

    Any ideas?
     

    Attached Files:

  14. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    I'm quite confused by what you're doing and don't understand, sorry. :) Is there any reason why you're making 8x8 levels? Since the actual levels are apparently much bigger? Wouldn't you just make them 1000x1000 or whatever dimensions you're using?

    --Eric
     
  15. siegeon

    siegeon

    Joined:
    Nov 23, 2010
    Posts:
    81
    Think of one of these "levels" as a just a tile in the overall map. As far as I can tell there is no other way to save smaller chunks.

    I have found that building my tiles this way helps with the overall speed of development. The map generator creates a map that looks a lot like image 3. This randomly generated map does not account for the isometric effect of the tiles. I need many more tiles to create the desired effect. For example, a typical east-west from the map (image 3) is rendered as level (image4). With enough of these chunks, I can create my isometric dungeon from my individual tiles. The only other option I had was to embed a lot of code about how many tiles would need to be rendered to duplicate the effect. I started down this path it was much slower. If there is a better way to achieve the desired effect, I am open to experimentation. However really the problem I am encountering are the massive number of tiles being drawn.
     

    Attached Files:

  16. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    For smaller chunks, you should use groups. You can use LoadGroups and then CopyGroupToPosition to place a group somewhere in the level.

    --Eric
     
    GarBenjamin likes this.
  17. siegeon

    siegeon

    Joined:
    Nov 23, 2010
    Posts:
    81
    I agree with you, and groups are where I started with this process, but I ran into a few problems. The main issue was I was only able to make 31 of them. Whereas with levels I can save virtually any amount of them. Once I started building variations with different tile configurations (IE temple rooms, trap rooms, features, etc.), I quickly surpassed the 31 hard limit. Currently, I have more than 120 arrangements of tiles. Also, I can not name the groups, recalling that Set 3 is a corridor tile with n, e, s, w open is annoying. Whereas with levels I can just save a level called corridor_tile_N_E_S_W and load them for the resources folder by name.
    I can overcome the naming thing with convention and enums, but I need to have access to many more groups to use them. Also,will this change fix the issue of the engine rendering more tiles than it should?
     
  18. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    There's no practical limit to the number of groups. There's a limit of 32 sets of groups, but that shouldn't be a real limitation (it's primarily for organizing groups, so you don't have a single list of hundreds of groups, unless that's what you want of course). I'd recommend using enums to make group numbers human-readable, or you could use a dictionary if you want to use strings, though I'd recommend staying away from strings where possible. When using SpriteTile as intended, only the tiles visible by the camera exist as objects.

    --Eric
     
  19. siegeon

    siegeon

    Joined:
    Nov 23, 2010
    Posts:
    81
    OK I will do some work to convert levels to groups. And try it out.
     
  20. years1hundred

    years1hundred

    Joined:
    Sep 3, 2016
    Posts:
    7
    Mr. Eric,

    Thank you so much for replying back to me! I really appreciate it!

    As it is, this is the level I made (as a quick test) in SpriteTile:
    https://gyazo.com/5de87d58fcc5ccdda5e60b27a8379675

    And this is the script I created as per the SpriteTile documentation:
    https://gyazo.com/97f38d30da3c262a28c3b29815ad312e

    So what I did is then create an empty child within Unity in the Scene where I wanted the level to load. However, when I did so, I got the results seen in the original screenshot (I'll repost it here for convenience):
    https://gyazo.com/13671155c76fd483a9c8efef282e4ace

    It could be that I'm just 100% not understanding the documentation, but if so, I would love to know that too, as I just have no idea what to do to fix this.

    Thank you again for your time! I really appreciate it!
     
  21. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    The screenshot of the level you posted doesn't seem to have anything to do with the other screenshot. Can you describe in words what's going wrong? Also when posting code, please post it as code and not a screenshot (although it's not really a big deal in this case).

    --Eric
     
  22. years1hundred

    years1hundred

    Joined:
    Sep 3, 2016
    Posts:
    7
    Good to know about the code - thank you for letting me know about that!

    As for "what's going wrong", I honestly don't think anything is "wrong", per se, so much as I have no idea how to properly load the SpriteTile-created level into the Unity Room. Basically, with my code, I was trying to create an object within the Unity Room with a script assigned to it, with the script's sole function being to load the level I created with SpriteTile. The idea is that on awakening, the empty child with the loading script would summon the SpriteTile room, as having read the SpriteTile documentation, I thought that's how it had to work. But that doesn't seem to be working, so I feel like I'm vastly misunderstanding how it all works. :(
     
  23. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    I would recommend having a look at the various SpriteTile demos so you can get a good idea for how things work. The basic idea is that you make a level in the editor, save it, then use Tile.LoadLevel to load it at runtime.

    --Eric
     
  24. siegeon

    siegeon

    Joined:
    Nov 23, 2010
    Posts:
    81
    Eric,

    Thank you for the tip with the groups, the camera does respect them. However, I find that working with groups is almost unbearable. I am not sure what the cause is, but somehow my workflow causes the groups to unload regularly. By unloading I mean that the group window clears out as if the editor was just opened. The tiles in the tiles window stay loaded, and so do the tiles in the level window, the groups just vanish.

    My typical workflow is to make a 8X8 tile in the level editor. Then I will select all of the tiles using All button. Then in the groups window, I will click on the Make From Selection button. I will then click the group Save As button. Then in visual studio, I will update my enum mapping to match the created tile and save my file. It is at this point (sometimes before, sometimes after) in which the groups will simply unload. I will then have to open them again to continue.

    I really like using groups, but the constant re-opening of groups file is becoming really annoying.
     
  25. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    If you check the "Auto" option next to the Open button in groups, it automatically loads the group file whenever the editor window is opened or refreshed, so the groups are always there.

    --Eric
     
  26. siegeon

    siegeon

    Joined:
    Nov 23, 2010
    Posts:
    81
    Nice, that did the trick... should have clicked that auto sooner thank you.
     
  27. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    I've actually been wondering if I should just remove the auto options for levels and groups and have that be the standard behavior. I always leave them on myself. Would anyone find that problematic?

    --Eric
     
  28. siegeon

    siegeon

    Joined:
    Nov 23, 2010
    Posts:
    81
    I think it would be a great addition. It would also be sweet if the groups window did not resize on reload.
     
  29. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    Actually the window sizes are saved, but are also saved in the level file, so having a level auto-load overrides the sizes with whatever are in the file. The idea is that if you're working on a level and have things set up in a certain way for that level, loading the level restores stuff to the way it was, but perhaps having editor window sizes saved in the level is not very intuitive.

    --Eric
     
  30. psychicsoftware

    psychicsoftware

    Joined:
    Jul 11, 2012
    Posts:
    14
    Apologies if this is covered somewhere, but I can't find it.
    I'm doing an isometric-style game and control of the drawing order will be fine for that, for the actual tiles themselves. But what about for player characters and other dynamic sprites that are not under direct control of SpriteTile - is there some way to insert them into the same drawing order list, or is there some other way you'd recommend to handle this?

    edit: ah, nevermind. I see you're using an existing sorting system in Unity for sprite renderers. Me = Unity noob. ;-)
     
    Last edited: Sep 15, 2016
  31. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    Yep, just use appropriate sorting layers and/or Renderer.sortingOrder.

    --Eric
     
  32. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    680
    I have a quick technical question if you don't mind- I'm working on a chunk-based top-down game, right now the world is generated at runtime, and consists in around 5,000 sprite tiles onscreen at one time, which obviously bloats my performance with the gpu overhead + all the gameobjects. I would ideally like the entire world to be a (seemingly) seamless space with millions of tiles, are SpriteTile's optimization features set up to handle something like this out of the box?
     
  33. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    Yes, SpriteTile only has objects for tiles that are actually on-screen; they are recycled as needed so there are never any more than necessary for display. You probably wouldn't even need for it to be chunk-based; at 7 bytes per tiles you can have millions of tiles in memory without a problem. But if you still want to do that, there are functions for loading blocks of tiles.

    --Eric
     
  34. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    680
    Okay, excellent! Thank you very much for the quick reply :)
     
  35. years1hundred

    years1hundred

    Joined:
    Sep 3, 2016
    Posts:
    7
    Hello! I hope you had an amazing weekend! As it is, I sent in two support tickets via your main website - I dunno how often you guys are able to check the corresponding email, but if you'd be able to respond to those, that would be amazing!

    Thank you very much for your time.
     
  36. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    680
    This is an absolutely fantastic product and after a day of playing with it I'm happy about every aspect of it, so first and foremost thank you for saving me a ton of time by writing this! :)

    I'm using it to draw a large procedural world with three dimensions (like dwarf fortress), so right now I have one 3-dimensional array I used to store metadata about each tile, and separate 3d arrays for each type of entity that needs to spawn as a gameobject with its own monobehaviours. I was wondering if the tilemap SpriteTile generates has any kind of delegate/event messenger I can subscribe my level manager to in order to determine when a grid coordinate is drawn (and thus presumably visible) or culled?

    I'm basically trying to set it up so that every time a tile becomes visibile I can call my own SpawnEntities(Vector3 mapCoord), and likewise when a tile goes offscreen I can run DestroyEntities(Vector3 coord) to ensure that I don't waste cycles simulating things the player can't see.
     
  37. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    Glad you like it! There isn't currently a feature like that, but it sounds like a good idea. If you want to get something going right now, you might want to hack the source code, where a good start would be to look at the SetScreenSprite method in the Tile.cs file, specifically the if statement under the "Check if off-screen" comment. That way you can tell if an Int2 position is on-screen, and of course doing the opposite would mean it's off-screen.

    --Eric
     
  38. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    680
    Hmm, that's really helpful, thanks for the quick reply!

    Any chance you'd consider adding native delegate/event hooks eventually? I'm sure I can figure things out diving into the source, but if it's something you're going to add anyway in the next few months, I'll probably hack together a much sloppier temporary solution. :)
     
  39. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    Yes, it does seem like it would be generally useful.

    --Eric
     
  40. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    680
    Okay awesome, thank you again for your help :)
     
  41. slake_it

    slake_it

    Joined:
    Aug 2, 2015
    Posts:
    81
    Hi there,
    seems great but couldn't find the docs, can post a link to the video or written docs ?

    Thanks
     
  42. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    The docs are linked to on the SpriteTile page on my website.

    --Eric
     
  43. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    Version 3 is nearing release, finally! It took longer than I wanted (and will still take some more time), but there's a lot of stuff. The preliminary release notes are below, but the main features are:

    • A lighting system, which supports unlimited lights with essentially zero performance hit for static lights. Lights can cast shadows and have simple radiosity, all of which is tile-based (it's not pixel lighting). This is achieved with what I call dynamic baked lights, where lights are baked, hence the no-cost rendering, but they're used like dynamic lights and can be moved on the fly. Since it's tile-based lighting, this is fast and depending on various factors (primarily CPU speed, size, shadow-casting), you can move dozens/hundreds of lights per frame.

    • Custom properties for tiles, for assigning arbitrary numbers, strings, and GameObjects to tiles. Prefabs are instantiated where they are placed in the tilemap, so you can have independent GameObjects mixed with tiles easily without having to manually set them up in the scene view.

    • Can have custom functions run when specific tiles enter or leave the camera view, similar to OnBecameVisible and OnBecameInvisible.

    SpriteTile 3.0

    Additions:
    • Tile.SetLight, for instantiating a light style at a specified position and setting its light intensity. Light styles can be added with AddLightStyle or loaded along with a level made in the TileEditor.
    • Tile.DeleteLight, for removing a placed light.
    • Tile.MoveLight, for moving a light from one tile to another.
    • Tile.RefreshLight, to recompute a shadow-casting light in case any colliders in the light radius are changed.
    • Tile.HasLight, which returns true if a cell contains a light and false otherwise.
    • Tile.GetLightStyle, which returns the light style of the specified light instance.
    • Tile.GetLightIntensity, which returns the intensity of the specified light instance.
    • Tile.GetLightPositions, which returns the Int2 positions of all lights in a layer.
    • Tile.AddLightStyle, for adding a light style with various properties (size, color, etc.) that can be used with SetLight.
    • Tile.RemoveLightStyle, for removing a specified light style, and all lights that might be using it.
    • Tile.ChangeLightStyle, which changes the properties of the specified light style, and all lights which might be using it.
    • Tile.SetAmbient, which sets the ambient light (base color for all tiles) for a layer.
    • Tile.UseRadiosity, which indicates whether shadow-casting lights should use a radiosity effect or not.
    • Tile.AnimateTilePosition, for animating a tile at a particular (x, y) position. (Contrast with Tile.AnimateTile, which animates all tiles of a particular kind.)
    • Tile.StopAnimatingTilePosition, which does what it says.
    • Tile.WatchTile, for watching the position of a tile and calling a function if that position comes into or goes out of view of a camera. Similar to OnBecameVisible/OnBecameInvisible Unity functions.
    • Tile.StopWatchingTile, in case you don't want to watch a tile anymore.
    • Tile.GetProperty, for getting optional tile properties, namely number (int), label (string), and GameObject (prefab).
    • Tile.SetProperty, for setting an optional tile property.
    • Tile.RemoveProperties, for removing all optional properties a tile might have.
    • Tile.HasProperty, which returns true if a cell has any optional properties and false otherwise.
    • Tile.SetColliderTrigger, for setting the isTrigger value of tile physics colliders.

    Changes:
    • Tile.SetMapBlock now has an optional "instantiateGameObjects" parameter, which if true causes the appropriate GameObjects to be instantiated for any tiles in the block with a GameObject property.
    • Files saved with SpriteTile 3.0 are version 4 now. SpriteTile 3.0 will load files from older versions, but older versions will not be able to load files saved with SpriteTile 3.0 or later.
    • Tile.AddColliderLayer uses any defaults that have been set up with Tile.SetColliderMaterial etc.
    • Tile.useTrueColor is true by default.

    Fixes:
    • Tile.SetMapBlock updates physics colliders correctly.
    • Fixed cursor texture console warning with Unity 5.4.
    • Fixed bug that could cause visible tiles to not be updated after being changed, when using multiple cameras.
    • Removed GC that would occur when using tile materials.

    TileEditor additions:
    • Lights section, for managing different styles of lights and their properties.
    • Light Mode button for adding/deleting/moving lights.
    • Light overlay toggle for showing lighting in the level.
    • GO overlay toggle for showing any tiles with an extra GameObject property.

    TileEditor changes:
    • Setting tile properties now has the ability to set extra properties (number, label, GameObject).
    • Other improvements for the tile property editing area, especially when multiple tiles are selected. Most notably, multiple tiles with differing properties use multi-editing like in the Unity editor. Properties displayed as "—" aren't changed when finishing the edit, which allows applying a specific property to multiple tiles while leaving other properties alone.
    • There's now a custom cursor for drawing with an active random group, to make it more obvious.
    • If tiles are deleted from the project without deleting them from the TileEditor first, opening the TileEditor presents a dialog with the option of deleting them from the TileEditor.
    • Prevented undo list from being added to indefinitely; oldest elements are removed if it gets huge enough.
    • Internally, the level is no longer inverted to accommodate the top-down coords of editor GUI code, but instead the drawing logic is changed to correctly handle levels without inverting them. This has no effect on usage, but anyone who has made changes to TileEditor source code should be aware.

    TileEditor fixes:
    • When loading standard groups from files that were saved with version 2.12 or earlier, groups have a tile size assigned using the tile size of the current layer, in order to prevent errors. In cases where the current layer tile size isn't the correct tile size for the group, the groups should be recreated and re-saved.

    --Eric
     
    sanpats likes this.
  44. HomeWorld-Arts

    HomeWorld-Arts

    Joined:
    Apr 14, 2013
    Posts:
    3
    Is there anything that needs to happen to make spriteTile work with Unity 5.5? There is no longer any options to open the editor in the Window menu...
     
  45. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    I was going through everything with Unity 5.5 earlier today and everything seems to work, including the menu item:

    Screen-Shot-2016-12-02-at-10.05.53-PM.png

    Perhaps re-importing all assets would fix it? You could also try the keyboard command to open the window, which is Cmd-Alt-E (Mac) or Ctrl-Alt-E (Windows). Do you know if you have issues with other custom menu items?

    --Eric
     
  46. HomeWorld-Arts

    HomeWorld-Arts

    Joined:
    Apr 14, 2013
    Posts:
    3
    I already rolled back to Unity 5.4.3.

    Both of us at HomeWorld Arts were not able to see the menu item when we upgraded to Unity 5.5.0 (we are both on Windows 10). I tried reimporting all assets twice and it did not solve the problem. Other custom menu items were showing up fine.

    When I selected the TileEditor.dll, the inspector showed an error saying that it targeted .NET 4.x and the editor only supports up to .NET 3.5. I suspect this was the issue causing the menu item not to show up. Everything else worked fine, levels loaded, etc.
     
  47. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    OK, I didn't try the dll, and I can see the issue. I'll take a look at that, but in the meantime, you can switch to the source code.

    --Eric
     
  48. HomeWorld-Arts

    HomeWorld-Arts

    Joined:
    Apr 14, 2013
    Posts:
    3
    Thanks for the quick replys! Looking forward to version 3.
     
  49. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    No idea why it's saying it's targeting 4.x since it's clearly set to 3.5 in the settings, but in any case, I did a bit of hacking and seem to have fixed it. I'll send you the dll via PM. Anyone else who wants this, let me know.

    --Eric
     
  50. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,250
    Here's a quick WebGL demo of the tile-based lighting system in version 3.0. I experimented with a line of sight method that's simpler and faster than anything else I found on the web for tile-based shadow-casting. It's also a cheat, but it ended up actually working well enough that I kept it. I expect I'll have an option for a more accurate but slower method in the next version.

    lighttile.png
    --Eric
     
unityunity