#πΌοΈβ2d-tools
1 messages Β· Page 7 of 1
Yes
If you don't have a program that can save PSB files then you probably have to resort to slicing the sprites the old fashioned way
Gotcha. Thanks anyways
Hi! I'm not entirely sure this is the right place, but... I'm sorry to ask a quite trivial question for top-down settings.
I'm still sorting my first scene just for my player to move correctly in it. I have 2 issues that I can't answer right now, I'll just go for the first one and see later the second if anyone can help.
I'm having an issue with sorting layers as my character has a tall sprite. He sometimes at the same time is both above and under some background, as in the picture following.
Of course, it makes sense: in this first picture, his sprite is under the background. I don't know how to check for him to be both above (his feet) and under it (for his head or upper body) at the same time.
Unfortunately I can't just ask the background to always be under or above the player: sometimes the player will move around an object and be above, then be under it.
I used sorting layers and group sorting but it didn't do the trick. Here are my current components.
For the background
For the objects in it
For the player
I tried to add another SortingLayer named Character for him, but of course when I use it, he's always above everything, so it doesn't work (which is normal)
As advised in tutorial videos, I also checked the Edit>Project Settings>Graphics: Transparency Sort Mode "Custom" and Transparency Sort Axis X0,Z1,Y0. But my character doesn't agree with it, as shown under.
He isn't always above the background.
I'm sure it's a quite common issue, but any help would be appreciated π
I think usually in this type of scene you'd sort everything by height axis rather than depth axis as it does by default
Then you'd make sure each sprite's pivot point is at the feet or point of contact with the ground, to make everything play nice with the vertical sorting
And you'd simply not have walls that are both angled and thin enough to allow a character in the same vertical position to be either in front or behind of the wall depending on horizontal position
Or if you want more control than sorting from height gives you, you might use sorting sorting by depth and make depth correspond to height with a script barring some exceptions like the angled wall where you can have your depth position script do something specific
Probably not worth it though
A more modern solution might be to use opaque geometry for sprites instead and prop them upright, essentially rendering the whole game in 3D with carboard cutout characters and let opaque sorting solve all the depth problems
However it's a lot of work to convert into that workflow and Unity's sprites don't support opaque sorting so you'd be fighting against it a lot
Thanks for answering! Well as I mentioned just above, I did change the default depth axis to be a width axis; It works better with object on the side, but not with above objects. It does what I shown in the last picture. When I change it for the height axis, it works better (but not perfectly) with the background, but not with surrounding objects that are near the player, on his sides.
Should this be changed scene by scene? Isn't there an option working this issue ^^? I thought it was pretty common.
The last solution you mentioned however isn't clear for me, I'll research it ^^
I don't really see how using width as sorting axis would work
There isn't any one solution that "solves" the problem of what happens when your character is overlapping another object and moving up and down because the "correct" sorting is fundamentally ambiguous in that situation
To my knoweldge the common solution is to use height for depth and stop objects from overlapping with colliders in those ambigous cases
I haven't really seriously researched it though
Where the player was intended to be both under and over an object, like a bed, partitioning sprites was used in the old days
I see, thanks. I think I'll change my background sprite to encompass all the objects that should be "under" the player, the ones near walls for instance. I hope this works better.
How do you do for instance when you have a tree, and the player must be above it sometimes, and sometimes must past it and be "under" it? Genuinely asking π
(I mean when you have several trees and the player is above a trunk and under some leaves, for instance?)
Usually trees are tall enough that the player cannot reach above them from the front, so they can be sorted by Y just like almost everything else
If the player must be in front of the trunk but below the leaves, I'd make the leaves another sprite with an order in layer that places it above most other objects
So the player would always be under the leaves regardless
I think I'll go with that each time then! π
Hey guys quick question. What's going on? It only seems to happen when I rig only the body. If I make all parts of the sprite visible auto geometry works just fine
I dunno, but did you click on the red message at the bottom of the screen and look at what the trace is saying?
Yeah, it goes into Unity's internal code so I'm guessing it's a bug
Also, sidenote but I suggest putting a vertex at the base of each of those bones for better triangulation.
Those long skinny triangles will give really funky deformation when it bends
Unity's built in triangulation kinda sucks in general
ive got a question my classmate and i need to programm for a school project and weve bought some assets from the store, yet we cant seem to figure out how to slice the animations apart and import them as a tileset
Hello there, I am trying to implement a fake destruction system in a 2D project where I am using sprite masks to do the effect however It is not detailed at all, it just reveals a solid color under an object
So what I want to do is place an actual sprite at a spot instead of using a sprite mask while hiding the parts that are not inside the mask area
here is an example, this is my sprite mask, as you can see it reveals a solid color beneath
Now I want to use a sprite to use detail instead of a solid color at the bottom while also allowing me to modify color and transparency of my sprite
but as you can see in the picture, the sprite is not masked as the sprite mask, it is also rendering above the masked area
I have tried to use sort order but the effect is always the opposite of what I need, only the top (outside mask gets rendered)
How are you adding the sprite?
I already fixed the problem, I literally inverted the mask, so now the terrain masks the sprite instead
thanks
Hello there, I am trying to use postprocessing on a 2D project with URP 2D renderer, and for some reason the postprocess updates in scene view but nothing happens on game view, Am I missing something?
Nvm just fixed it
howdy i'm moderately novice at unity, learning how to work the rule tiles to create a auto generating dungeon, its a pretty complex tile set so i wanna do several rule tiles that work together, i heard the advanced rule tiles was good for that, so i got it, but i'm having hell wrapping my head around how it works, like what the colored circles do
i dont know if this is a 2d tool but how can i make this line from the canvas disapear ?
So guys i have a scene view that looks fine, but when i went into game mode it turned really pixelated
so the thing is also its a really small window and when i scale it it becomes like that
why is there big difference between square and tile though they have same material and i have used pipette to set the square's color right
For all of the sprites, make sure the filter is set to point and make the compression to none
no i think the problem is that i have to scale it up
i did that and it didnt work
bc see if i scale my camera really to be really small the images are high quality
ok nvm when i build, it looks fine
but i still get this black bar to the right and the ui is a bit wonky
hey could anyone help me with this issue im having? my pixel perfect setup is somehow messed up but i don't understand how, ive probably watched every tutorial/"fixed" video on youtube by now and on page 5 of google, no solutions work
I've tried messing with every setting on the main camera and cinemachine camera. I have all the pixelperfect extensions,
here's an example of how it's messed up, it's like really weird rendering
https://files.fm/u/wmuj3z3u5
Maybe resize the image itself
Or change the game display size
i just changed the resolution xd
but i wonder if thats a permanent fix
something tells me no
When I import a sprite in unity, the sprites get all distorted (example of sprite in unity vs sprite file) Is there any specific reason why?
Texture import compression
Is there any way to fix it?
Disable compression
Where would that be at?
Choose your sprite and in inspector you can disable compression
Hey guys, i wanna try some shadows for my 2D game, i saw a youtube video and he uses "Shadow caster" something like that but i cant find it, not even in store as package
it said its called "2D Shadows" but doesnt exists or idk
Are you using the URP?
You need urp for the built-in 2D lighting, here is more info note the urp versions etc. The component is called Shadow Caster 2D https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.1/manual/2DShadows.html
2D shadows in the experimental branch are still WIP. They will stretch indefinitely so it has limited uses.
How did you find out it is experimental?... I mean the 2D shadows are specifically included in the 2D URP Core templates, unless I am mistaken.
You just have poor rulings. You should watch a quick video and copy what they use for their rules. It becomes more intuitive once you see someone do it once.
But it is working as intended here.
ight lemme look
wym shouldnt the one already placed not change
so if i have a grass tile only the ones on the corners change
You're using a rule tile. It is updating because the tile next to the one you're placing is taking into account its rules.
You need to create rules to account for that.
These tiles dynamically update when tiles are removed or placed, even ones you already placed.
ohh i was doing it the opposite way i got it
so in my code now, instead of checking for corners and stuff, i can just place this rule tile right
theoretically yes
you should be able to make one rule tile for each terrain type then have them generate accordingly
yea i need to make corner tiles for other terrains, it works, just looks a bit odd cause the tiles dont blend well with other biomes yet
Did you try using a lit sprite shader on the particle system
i think it just makes the particles pink i'll try again when i get home
most likely wont work tho i'm p sure i tested that
why they have different colors?
first one is object with square sprite
second is tiles
i used pipette to set right color but it seems different
also they have same material
Why is there a random green box on my sprite?
(The one on his face not the collider)
There are also blue ones lower down but they are more subtle
I moved it to a different scene and now there are different boxes
A purple one this time
Nvm i messed around its the compression
If i use for example a canvas of 64x64 bit for the player profile (to make it look better) can i add it to a 32x3w or 16x16 bit game? Like adjust it's size to fit or it's not possible since those r 2 different sizes.
I am not sure about exactly what you are asking since your message is word soup, but IF you want to know whether you can mix sprite sizes in one game, then yes you can.
Ty
does anyone know how to push the randomness of the random tile output toward one tile? changing the noise changes, well, the noise, which doesnt really help, and adding more tiles of the same type (to overwhelm another) seems to have some very weird behaviour and I cant quite figure it out
For example I'd really like to just say "20% of water tiles should be "Water_1" and the others will be "Water_2"
Hey, so I have image sprites and I would like to "extrapolate" the edges further, either algorithmically or possibly through AI. Maybe have the edges blured out. In other words, generate extended edges to a sprite/picture. Only has to be "as good" as your vision's edge would be. Any idea of a technique I could use for this?
Dilation is the simplest(and the method unity uses by default for sprite sheets)
can anyone help me figure out why my physics2d.linecast is not finding this collision?
guys can someone tell me how i made this water tile i dont remember what i clicked but my water tile became like this
i know this is not a prefab but what is this
Should we make every tileset fit the same size, like mine is all 32 pixel, floor tiles, furnace, chest and I think the ratio somehow not correct
hey all, I imported this spritesheet and one frame is cropped. this cropping is not in the spritesheet. Any chance someone knows what the issue is?
I guess it might be an outline issue
Check the sprite outline in sprite editor and/or define custom outlines that don't crop anything out
thanks for the reply, if you have a chance, is anything here looking like the culprit?
reimporting the spritesheet seems to have the same cropping problem. ive imported the troubled frame as a separate png in the meantime to get around this issue.
This window doesn't display the actual outlines until you have generated or created custom ones, due to some quirk
Also, not sure why the generate button would be greyed out here but that seems to prevent you from generating any
Another way to test this issue is to swap mesh type from tight to full rect
dude you're a life saver. this was it
thank you very much
That appears to prove it really was a sprite outline issue
Fixing the messed up one would be the "ideal" solution but this works as well
cool good to know. just out of curiosity, what would fixing the messed up one be? the raw spritesheet looks fine as far as i can tell
Unity's sprites are meshes made from polygons
This can be a quad ("full rect") or a an assortment of triangles that conform to the sprite outline ("tight")
This because rendering empty transparency is more expensive than rendering multiple polygons that don't spill over, in most cases
A sprite's generated outline vs the sprite's mesh generated from the outline
Because the sprite is just a mesh with a texture on it, the sprite will cut off if the outline doesn't cover it
wow i did not know this!
now its fixed using 'tight' with this method
thank you again
yo can someone help
im trying to use skeletal animation, but whenever i drag my sprite into the scene after rigging everything it just shows up as a normal sprite
nvm i figured it out
why does the photo is looking like a minecraft statue
demnn
too seggyy
Not sure what that means but note that this isn't the place for off topic chatting
hey spazi which unity 2d game tutorial you started with pleaseee tell me i am struggling to find a good tutorial
PLSS
ppelase
Very beginner friendly and includes many different course projects
that is not free
Correct
i can learn for free from that web right?
too expensive
Yes, either with Unity Learn or hunting for random tutorials or free courses on google
GameDev.tv is actually running a game jam right now that rewards you a free course of your choice
https://itch.io/jam/gamedevtv-jam-2023
ahh man do you know any free course my father he has 10cents in his bank account
::(
Besides Unity Learn I don't
Did you look at it?
i did but i can't find a tutorial do you know any youtube tutorial how to make games in 2d ?
pls
which unity 2d course you started with??
The site has tutorials π€
It's up to search for guides that fit your specific need
which unity 2d course you started with??
I already told you
You need to stop spamming the questions and get to searching
i am searching for 2hrs i was not able to find that is why i was asking you
::( didn't expected that
https://learn.unity.com/pathway/unity-essentials?uv=2019.4 + https://learn.unity.com/project/ruby-s-2d-rpg
thank you
Hello, why doesn't the grid in the scene not the same size as the grid of the tile palette?
Sprite import PPU
what's PPU?
Pixels Per Unit
it's 100
That'd be correct if your tile sprite art would be 100x100 pixels each
But it's not
how can i learn the PPU of my sprites? The site i downloaded them doesn't say
i think it's 16
You can look at the sprites and see how many pixels they are in width or height
The artist who draws sprites would decide together with programmers or designers how many pixels will be in a tile, which then informs the overall resolution of the game or size of the tiles relative to characters
yeah 16
Just so you know this is not a server for discussing problems related to ripped assets
ripped? I don't know what you're talkin about
thx btw
Hi! Can I bother you for a second? I'm also working on tilemap, my tiles is 32x32, I'm making on a layer of some furniture, should the tiles also restrict to 32x? I tried but the ratio just... wrong. Smaller I can work with, but those slightly pixel out of the grid when I make it bigger just annoying so much. Is there an alternative way?
Sorry for bad English...
There can be multi-tile objects, and gameobject tiles that separates the sprite from the tileset
Thank you <3! I will look for that document
What do I use for 2d
You start by making a 3D game as normal and then carefully carve out the third dimension
Hello, is it possible to add script and a seperate collider to an individual tile map inside a tile map palette? I want the player to interact with that tile. I want to add a mesh collider on the bottom of the question mark box and when the player contacts that collider, a mushroom will pop out of the box. Or should i just skip that and make that box from a sprite, not with the tilemap?
I would make interactable blocks their own tile map and when a collisions is detected it would get the nearest tile, while also using scriptable tiles in order to place items and other properties in the tile
yes but there will be other interactable tiles with different functions should i create a different tile palette for each of them?
oh you mean like the animated tiles and rule tiles?
No, scriptable tiles
i checked this https://docs.unity.cn/Manual/Tilemap-ScriptableTiles.html it didn't mean anything to me. Then watched some videos on it , there's way too much coding involved, i was overwhelmed. What's the short version? Do i need to create a script for the function i want to add, turn it into an asset than attach the sprite i want to use to that script and then drag it to the tile palette, sthng like that?
Which software would be the best to use to create 2d art and pixel art?
For character(animated), assets etc for unity
aseprite and photoshop
Hello!
So I got comics I want to show to my players at different point in times and I wanted to grow the panels of the comic of the screen is big and shrink them if the screen is small. Each panel have a different size. I found the Layout Group component, but it stretches my images. (Here is the thing I am talking about: https://www.youtube.com/watch?v=ouXCjFcfNfA)
Is there a better tool to adapt images to different screen sizes?
Layout Groups can be pretty tricky to understand. In this video I'll show you the basics on how to organize your user interfaces using the various tools provided by Unity. You'll learn about 'Horizontal Layout Group', 'Vertical Layout Group', 'Grid Layout Group' and 'Layout Element'
I'll also show you how to setup a typical interface split (ma...
hey y'all, i've got a question regarding how to set up the game object here. i have a rectangle with text displayed on it, and i'd like the letters to turn red as the player types each letter:
i currently have two text mesh pro boxes in the rectangle, with the left one containing red letters and the right one containing black letters. is there a way to do it so that the word is centered and doesn't change position as the letters are moved from the right-side box to the left-side one?
If you just want everything to adjust to screen size together, I'd just use a canvas scaler.
I'd probably calculate the combined width of the two boxes and scale a rect to fit that- and then have the red text left aligned and the black text right aligned and each pinned to one side of that box.
got it, that makes sense. how might i calculate the width of a text box with certain letters in it? can i make the boxes auto-adjust to the width of the letters it contains?
There is probably a super clever method but I would just make an invisible copy of the complete text and use its rect as a template.
Either that or cache the complete width before splitting the text up
i'm able to (almost!) achieve it using a content size fitter:
Can't view that; I'm on mobile
the text is shifting ever so slightly though, and the rectangle also isn't resizing to fit the words
Ah. I dunno.
Someone can explain me why i see nothing with my camera please ?
probably because the far clipping plane is only 0.31
He need to be at what number ?
at the number where you can see everything you want
Thank you very much!
can someone explain why the animation is doing funny things? i recorded the animation to only enable its corresponding hitbox, but the up and down ones trigger them all despite me not recording it. how do i fix this? thanks in advance.
also im using blend tree which i forgot to show in the video
blend tree probably doesn't blend bools very well
is there a way to fix?
Edit sorry pinged wrong person, meant for @drowsy belfry hamboy is on the right track. Blend trees blend animations. Although you can't see the animations blend because you are using sprites at specific keyframes for spritesheet based animations the animation is still blending and firing all events on any animation if there is the smallest value in you x y. I'm not sure why all would be activating tho cuz it shouldn't fire if the value is 0... so your code is prob also has something weird in it. To fix the easiest way is to have your attack hotbox in its own animator with its own animations on a child gameobject not based on a blend, leaving your character in a blend tree without animations events. You can also just code an attack component to throw down a https://docs.unity3d.com/ScriptReference/Physics2D.OverlapCircle.html or something when you press the attack button instead of turning on and off ganeobjects but that is a bit more advanced.
Ur responding to wrong person
Sorry hamboy!
Hey! I've been struggling a lot to get something working, I'm trying to split a sprite in 2 part and then simply add those sprites to the scene and keeping their position from the original sprite. It's to achieve this effect on an isometric scene using z pos for sorting:
on the right the sprite is cut in 2 part allowing a good sorting order. I was wondering if it's possible to achieve that without doing it manually for every sprite
Use the pivot as a sorting point instead of default(center)
The pivot should be at the feet of the character.
Yeah it's my current setup, but it only works for symmetrical sprite
Oh. True. Sorry.
Try this https://docs.unity3d.com/Manual/Tilemap-Isometric-CreateIso.html
When a sprite is like rectangular like the above it doesn't work, the way I fixed that is by using some kind of zone above the sprite to modify the z pos, but I realized it just takes too much time as I have a lot of sprites in that case, and it's not very accurate either, especially when other elements interact too
Custom axis with (0,1,β0.26)
Yeah same already did this, it's the base setup for isometric
I already built like a pretty advanced setup with multiple levels of terrains, props, moving elements etc, my main issue is with those specific props that needs to be cut into 2 or multiple sprites
iβll look into it thank you very much
Hi, not sure if this is the right channel, bit overwhelming. point me in the right direction please if I got it wrong. Thanks!... If I have a sprite sheet and I want my particle emitter to use one specific sprite from that sheet, is the right way to go using the "texture sheet animation"? Or is there a better method? It seems over kill to just choose a sprite. Can I make the material itself choose just one sprite out of the sheet? Can't figure out how... Thanks again!
Someone can explain me why when i build my game the menu isnβt the same that in the editor please ?
Your UI scaling and anchors are proportional to aspect ratio, but not to screen size
To accurately represent 1080p monitor your game window resolution should be 1920x1080, not simply 16:9
Ideally you'd design your UI to work with multiple aspect ratios and resolutions, not just one
Oh ok i found the option 1920x1080 in the game editor and i can see the real result before to build
Thank you
I have an issue where the tilemap collision is strict, and sticks to sprite edges. I want the collision to be just a square for every tile. What am I doing wrong?
I've turned "Generate physics shape" off in the sprite import settings
and I also have "Full mesh" on for Mesh Type
Ah, I found the solution. If Anyone else ever wonders, it's a setting on the individual tiles that has to go from "Sprite" to "Grid"
do more people use the 2D or 2D (URP) template?
depends on what you want to do, though its easy to swap from the built in RP to URP. but difficult the other way around
so I'd say start with 2D then swap to URP if you really want to
I already created the project in URP
2D URP has 2D lighting and Shader Graph for sprites, but it cannot be combined with 3D renderers
so, i started using tilemaps recently, i know that for big objects like house etc.. we can use multiple tiles. But now i was wandering if its possibile to have a single sprite that is bigger then a single tile (i was thinking about a plant that goes a bit on the upper tile) without having to separate it on 2 different tilesπ€
It's possible? or i should just use the sprite without using the tilemap ? π€
You can
how? i can't find any resource on this thing π also thanks for the help π
I don't think there's anything you need to "do" to have tiles bigger than a grid cell
Their size is based on texture dimensions / PPU, and origin by the sprite pivot point
Yeah, it should just work
ποΈ Documentation
Pixel Perfect
2D Animation
Vector Graphics
2D Lighting
2D Sprite Shape
2D PSD Importer
2D IK
π Resources
Blogs and e-books
Samples
π€ Troubleshooting
- Lines between tiles: generally should use the Pixel Perfect package.
π¬ Forums
2D β’ Pixel Perfect β’ 2D Animation β’ Vector Graphics β’ 2D Lighting
πΊοΈ Roadmap
hello, i'm trying to add a skiing trail effect when my player char moves on the map. I did it with the particle effects but there's a problem with it as you can see in the video. The effect gets glitches out when i rotate the char. How can i fix this? I tried the trail renderer component but i couldn't manage to add the sprite which i want to use to that component(actually i managed to add it but i couldn't set it right, it looks weird) any idea how i can fix this issue?
set the particle simulation to world coordinates
thx, i did it but the particle sprite still doesn't rotate. Do you think rotation over lifetime and rotation by speed settings can do the trick?
Do you want it to rotate?
yes, same angle with the player sprite as it rotates to left and right
it looks odd when the player moves down with a 30Β° to the left but the ski trail is still 90Β°
The particle should emit at the angle of the emitter
what is the emitter in this case and how can i change it's angle?
The particle emitter that is presumably a child of your character?
ok how can i achieve this: "The particle should emit at the angle of the emitter" ?
i think the problem is the sprite. if i wasn't using a sprite for this, it would work fine. Particle emitter is being rotated the parent game object, it's the sprite that doesn't rotate
Did you set render alignment to world as well?
i did it now. Didn't make any difference
Hi. I have 2d simple mesh. How to convert this mesh to sprite asset? not a rantime. I slice 2d apple image mesh to several meshes and now i want to save this part as sprite assets and add it to scriptable object Parts with unique ID.
in unity
witout blender
Tilemap question:
I'm making a 2D top down game using tilemaps. I created a rule tile that has a floor of type A in the middle (the "default sprite"). The tiles around the floor are walls. Everything works fine and I'm very happy with this tool.
But now I want to have two types of floor, floor A and floor B and to be able to freely choose between them. Everything else should stay the same (the walls and rules should stay the same etc.). How can I achieve that? If I create another rule tile (or a rule override tile) and swap type A floor to type B floor, the walls from both do not connect, because they don't understand they are the same walls (Unity treats both rule tiles as separate tiles). What I'm trying to do is have two "default sprites" in the middle, and be able to choose which one is active, instead of just one.
What I'm trying to achieve is very simple, so I'm sure it's possible to do, but I don't know how, any tips? thanks!
asking the same question from a different perspective:
is there a way to make Unity think that a rule tile and it's override, are the same tile? (meaning they respect each other's existence on the tilemap according to the rules).
I know I can choose "single", "random" or "animation" placement, where is there no "Double" option, because that's exactly what I need
Iirc rule tiles already have multiple choice options per rule supported, though not sure if there is an easy way to control them...
You could also just make a second layer and stick the alternative floors there I suppose, right on top of the base ones.
I can't find the multiple choice per rule - only way I can do it, is using random selection, which is not what I want. I need to be able to precisely control where the typeA and typeB because they have gameplay meaning.
Second layer would work but it feels like a hack and a headache waiting to happen. Although maybe that's the best solution right now...
You can also extend rule tile to add whatever functionality you want
But that is a lot more work than the hack is
how can i get rid of such light bleeding on pixel object with normal map?
everything is point filtered
normal map
also, how can i see normal map debug viewport in 2d?
Try setting compression to 'None' or increase the max size depending on your texture and see if it looks better.
why would i increase texture size if its just 32x96?
and compression doesnt change anything to me
i think its something to do with renderer/shadow system
because itself normal looks like it should in engine
With that texture I honestly can't tell what it SHOULD look like.
like this...
but without that glitchy flickering lines
It is a still image so I can't see the flicker, and it is a blocky texture so I can't distinguish texture from lighting. Does it stil happen without the normal map?
just on the outline
it happens when light normals is not set to disabled
https://youtu.be/xpL44Ztyy1Q?t=1538
here this guy has same issue with tiles to the right
can it be caused by resolution of editor window not maximized?
huh im unsure if it could happen if there's not enough pixels on screen
huh yeah turns out to be only present in editor, in game that looks fine
also, how can i make shadows more blurry?
i tried deleting a tile from a tile map and now i cant use any tile maps
i just keep getting this error when i try drawing or removing anything
ObjectDisposedException: The Unity.Collections.NativeArray`1[UnityEngine.Vector3Int] has been deallocated, it is not allowed to access it
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckReadAndThrowNoEarlyOut (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <86acb61e0d2b4b36bc20af11093be9a5>:0)
Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle.CheckReadAndThrow (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle) (at <86acb61e0d2b4b36bc20af11093be9a5>:0)
Unity.Collections.NativeArray`1[T].Copy (Unity.Collections.NativeArray`1[T] src, System.Int32 srcIndex, Unity.Collections.NativeArray`1[T] dst, System.Int32 dstIndex, System.Int32 length) (at <86acb61e0d2b4b36bc20af11093be9a5>:0)
Unity.Collections.NativeArray`1[T].Copy (Unity.Collections.NativeArray`1[T] src, Unity.Collections.NativeArray`1[T] dst, System.Int32 length) (at <86acb61e0d2b4b36bc20af11093be9a5>:0)
UnityEngine.Tilemaps.ITilemap.RefreshTile (UnityEngine.Vector3Int position) (at <e2f8d68dc04c4d5ca055a2f9c3f7090e>:0)
UnityEngine.Tilemaps.TileBase.RefreshTile (UnityEngine.Vector3Int position, UnityEngine.Tilemaps.ITilemap tilemap) (at <e2f8d68dc04c4d5ca055a2f9c3f7090e>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
i've tried deleting all the tiles and the tilemap making new ones but those dont work either
Try to make it to 2D sprite in "Texture Type"
it wont work as normal, already tried
issue resolved btw
it just a visual glitch in editor
this is not though
Hello, I have a question, does anyone know why the colors change when importing a sprite in unity?
compression
ty
Greetings,
I just migrated from Godot after looking for a new coder for my 2D pixel platformer game.
Now my workflow completely changed because I cannot find one feature I was using a lot on Godot to create levels with ease and fast paced. What I'm looking for is the equivalent to Godot's Atlas feature that allows you to assign a draw percentage to multiple tiles so you can draw those multiple tiles randomly (according to the percentage) while holding down the brush. Is there something like this in Unity?
basically this
In case someone mentions this. I did find 2D Extras package. It lets me to take multiple tiles but they are drawn completely randomly. Unless there's an option I'm missing somewhere, this is not it...
@queen sandal The rule tile allows you to just have a tile that will place one tile down from a list of tiles. It is nice because while it is similar to random... It is actually based on noise. That means that you can adjust the noise to get different suggestions of random, but get back to the original "random" placement... You can extend the class and make it based on weights if you want or just add more of the more common tiles as a workaround
You can also just extend tile or tile base to make a fully random tile, but I think noise is better in most situations
This is interesting, sounds like what I'm looking for.
Is there any documentation on this?
This is the official doc on the rule tile, scroll down to output: random section. https://docs.unity3d.com/Packages/com.unity.2d.tilemap.extras@3.0/manual/RuleTile.html
where i can find debug view like depth/normals in 2d urp?
Hello
I dont know if this is the right place but I need help with sprites
Is it possible to make the head sprite fit in the shirt/body sprite?
You would need to use multiple layers of the outfit so the stuff behind is actually behind the head.
i have this when i'm switching to next scene
what textures should i make readableπ€
ok, i'm lost here. I have a 2D game and a psb file with a sprite. The different layers in the psb file are its different body parts.
My sprite will just be prefab that I want to be able to place multiple times in a scene (this is a tower defense game.) This sprite has animations and also 3 different facial expressions.
Now, currently I'm just dragging this into my assets as a prefab, and will be instantiating it in the game. Why do I need a sprite atlas and/or a sprite asset library? Are either of those necessary?
Sprite atlas is created automatically by the PSB importer, it combines all the layers into a single texture. Sprite asset library is required if you want to use the sprite resolver, otherwise not.
And how exactly can I do that?
Break it apart in whatever art program you use and layer the sprites in Unity
Thank you for the explanation!
Kennt sich jemand mit Bitsy aus ?
How would I give my tiles collision?
And you'd usually use the composite collider to combine all your tile colliders into one.
hey, why doesn't my player collide with obstacle in game mode and build version, but seems okay when i switch to scene. Only thing I know is the problem is not in tiles, they have tilemap collider component
moving mouse cursor in 2d causes huge lag spikes
even on empty scenes
huh, changing polling rate to less than 1000hz seems to fix that
2021.3.18f1 btw
it's actually still noticeable with 125hz, just way less
I need help fixing a zooming system for my project. It kind of works but just bugs out the moment I zoom in very close.
Basically, I want the camera to zoom into assets.
Im using my mouse scroll wheel.
This is what happens:
private void CameraZoom()
{
float scroll = Input.GetAxis("Mouse ScrollWheel");
zoomSpeed = cam.orthographicSize;
if (scroll != 0f)
{
float newSize = cam.orthographicSize - scroll * zoomSpeed;
newSize = Mathf.Clamp(newSize, minZoom, maxZoom);
cam.orthographicSize = newSize;
Vector3 mousepos = cam.ScreenToWorldPoint(Input.mousePosition);
mousepos = ((scroll)*mousepos);
cam.transform.Translate(mousepos);
}
}
In the video the camera is not correctly zooming into the assets
I want my zoom system to work like unity's scene editor camera zoom
also when I zoom it out by a lot it just teleports the camera somewhere
NVM i fixed it
if anyone ever stumbles across this problem here is what i did
That sounds like something worth reporting as a bug maybe?
Is there a way I can serialize data per tile in a 2Dtilemap
I need to setup a collider material scriptable object for my collision tilemap, to tell my game what particle effects and sounds to play when you interact with a tile
But that data needs to be serialized per tile, so that each tile can have a different material, not just one per the entire tilemap
Hello, I am making a mega man fan game and i am facing a problem in the animations. The sprite sheet has a run animation and a run shoot animation i need to sync both of them so when i transition from shoot to run shoot animation it plays on the same frame so it does not jitter. Any help on how to do this
I have no idea if this is a good way or if it would work, but you could maybe try https://docs.unity3d.com/ScriptReference/Animations.AnimatorState-cycleOffset.html that will start the state animation from a different point between 0 and 1 (0 is the start and 1 is the end) and from the state it can be set to use the value of a parameter you make in the animator (as seen in screenshot). Then you just need to set that parameter to the normaizedTime of the previous state... you can possibly do that by using a https://docs.unity3d.com/ScriptReference/StateMachineBehaviour.html StateMachineBehaviour which attach like a monobehaviour does to a gameobject... but to a state in the animator instead... StateMachineBehaviour class has a built in method you can override called OnStateExit which is called when exiting the state. That also includes a handy struct https://docs.unity3d.com/ScriptReference/AnimatorStateInfo.html which includes the normalizedTime that you might be able to pass to your created parameter using SetFloat. So set the float OnStateExit of the previous state... and when you enter the new state you should have the cycleoffset matching??? This is all theory, but might work... maybe someone else knows another way.
Thanks i will try it
Hi everyone, I have a dummy question. I'm creating a burning animation by using a sprite sheet. But how come that takes a single draw call for each instance? I have 3 sparks and take 3 draw call. Is it normal?
I think if you mark objects as static(and probably do something else as well) they will only take a single draw call for multiple if the same.
does anyone know why my tiles wont paint at all? i select them and try using the brush tool but none of it works
if you need any more info to help please say
Hi! not sure if this is the channel where i should ask this but..
I'm working on my first 2D top down game. a friend created the *.psb files for the character in each direction and i was going to animate it using Sprite Rigging.
But how do i switch between direction? should i have all 8 object in scene and active the direction in use? or there is a better way? π
i can't really find any nice tutorial about thisπ₯²
Also- bonus question. since most of my character are humanoid is it possibile to import animations between characters if they use the same bones? like how you would do for a 3d char with an animator avatar (?)
The two main methods are to sprite swap the individual pieces for different directions, or to (as you suggested) just have a separate version for each direction that you switch between.
Be careful- in unity, 'humanoid' usually refers specifically to mecanim humanoids, which are a specific setup. If your sprites use EXACTLY the same bones and hierarchy, then yes you can reuse animations. Unity won't do any retargeting, though.
Just ask your questions. Until you do, nobody is going to ASSUME that they know what you need.
Two separate issues. Break it down into individual questions and ask those questions. π
hi there, how do i change the default pixels per unit so i dont have to change it for everything i want in everything including tilemaps? is there like a default setting for this
you can change default import settings
running into issue similar to thishttps://forum.unity.com/threads/cannot-select-gameobjects-in-editor-in-2d-view-using-custom-sprite-shader.391820/
sprite backface cannot be selected if im using custom shader or not using sprite-lit-default
im using sprite lit shader graph
note that it only does that when sprite is flipped
damn its so annoying, what parametrs in shader graph i should use for sprite to use outline as selection in editor rather than 1 sided bounding box ?
really as simple as this setup causes so much trouble
no shader/shader
i feel like shader graph sprite lit is worse than sprite lit default, should i use default shader as base then?
Probably setting it to opaque with alpha clipping?
I'm not certain
there isn't?
or am i missing where i need to set up opaque?
eh i have 0 fucking idea what i changed but 1 sprite is clickable
though the outline doesn't follow the shape, not sure if its bad to ignore
i can dm somebody 2 shader graphs, 1 is working somewhat as intended, but another is not selectable on sprites
because im lost
im not sure if that can cause it
Hello! I would like to know if it is possible to sort the tiles of a minimap after the tiles got placed in a Unity project.
It looks like flipping 2d assets left-right causes the normal map up/down to be reversed as well.
Is that a known issue/something that is fixed in the new version?
I have a question is it possible to make animations from a single sprite? (for example idle sprite)
What do you mean single sprite? A single image?
Yes, if by minimap you mean Tile Palette. Do you want it to look like the texture? Because if you drop the texture in the palate it will mimic the texture... If you only want to rearrange there is an edit button you can toggle on.. this will allow you to use the brushes on the Tile Palette itself including the move tool.
Yes, for example you can create a new animation from the objects animation window.. if you use the record button you can set key frames on the one sprite where you can squish and expand it or whatever... you can add properties from many different components in a single animation... In the case of my example you would be animating the transform instead of a sprite renderer.
Oh well it worked thank you!
I dont know most of the things you said as I dont know anything about unity and I will probably only touch it once I learn a bit more code (C#) but its good to know its possible. thank you for responding! also if possible I hope if you have a video of what you are talking about it would be great if you could send it to me. Thanks again
https://youtu.be/sgHicuJAu3g this video explains how the animator works
Most of it doesn't require any code
With 2D art you'd usually animate the sprite reference to swap between sprites, but if you only have one sprite that you want to animate in-engine then you're limited to animating its position, rotation and scale
That is a known issue(incorrect tangents on sprite meshes), and unity doesn't want to fix it. You can get around it either by using the 2d renderer or by using a shader that compensates for the incorrect tangents.
How do I make an icon that always stays to the left of the player name and dosent matter on the name size
Is there any way to get rid of pixels not being pixel perfect WITHOUT attaching a pixel perfect camera?
I want my game to be pixelart but have some high quality post processing
But things like this pixel scatter destroy it
Post processing and other non-sprite visuals will only be affected by the pixel perfect camera component when "upscale render texture" is enabled
Yeah but it also messes up my current camera settings
Inevitable
Pixel perfectness is a function of camera scale and position to sprite scale and position
If you want pixel perfectness you will have to make some concessions to work with the fundamental constraints of matching sprite pixels to screen pixels accurately
You might be satisfied with an antialiasing solution instead of chasing pixel perfectness, such as
https://assetstore.unity.com/packages/2d/smooth-pixel-209066
nvm
I find pixel perfect rendering is kind of confusing until it "clicks" that you're rendering a whole number of screen pixels per sprite* pixel, without any fractions
So your game display resolution has to be divisible with the number of sprite pixels you're wanting to render
Hmm
I have a second one problem...
Why is my bloom shattering this way?
dont mind my keyboard
You could either use math to figure out the world space scale you need based on the distance, or you could put it on a 2d canvas
Why does my text stretch like this in my vertical layout group
It just weridly squeezes it
hey how can i make 2 tilemaps where 1 overlaps the other? (1 for walls etc., 2nd for wall decor)
Any way I can assign a color to individual tiles in a tilemap without modifying every instance of said tile?
Iβm trying to make a tile palette brush that lets me tint tiles
I think unity already made one in the 2d extras pkg
Do you have the vertical layout group set to control child size?
just create another tile on your grid object
and then set the order in layer
How to i fix my player going half into a wall. It works fine on my right wall, but not my left
i checked both of those boxes
Hello, I am trying to rig my 2D character. I have setup 3 bones for the body and clicked Auto Geometry but when I rotate the bones nothing changes. I am sorry if this is a noob question I am new to Unity and transfering my project from another engine.
It appears that all are affected by the red bone so I am confused why it hasnt generated geometry for the other 2 bones
You need weights for the bones to tie them to geometry
Geometry is not generated for bones, it's for the sprites
I see thanks a lot!
would someone be able to help me with my tilemap. The grid is off and theres random purple/pinks squares in the empty spots.
also when I use the draw brush the square it highlights is like 20 grids to the right for some reason, but it still draws properly where I am hovering my mouse
i remade the tilesset and figured out the cursor alignment, im not sure why the random pink squares apppeared though
I think it means missing tile references but I'm not totally sure
Yeah could be. I also had a question how do you guys add collision to only the edges of a tilemap selection. Should i have a separate tilemap for the edges of the map and apply a tilemap collider to only that one?
Does anyone know how to work with particles in 2D
My particles always show up behind the canvas instead of front
they stay hidden
Thereβs the sorting layer inside the particle system
Look through in the inspector
You will find it close to the bottom
Canvases are drawn separately. You'd need to do something like drawing the particles to a ui texture or the like probably, or put the UI into world space maybe.
that sounds unnecessary complicated lol
You could try asking in #π²βui-ux.
Does anybody know why a 2D collider could be rotated off the axis it's image is on? I've disabled the rigidbody also on the image but the issue is still there :/
Hello, have you fixed the issue?
I'm kind of late to respond but I can help if you still haven't found a solution
hey guys I just started with unity and have a question
Nope
yes?
@cunning kraken hey
I have a bit of an issue with assigning jumping script to my 2d character
Learn how to make a 2D platformer in Unity even if you are a complete beginner. In this episode we're gonna focus on installing Unity and making our player move around and jump.
β Unity Hub: https://unity3d.com/get-unity/download
β Black Square Sprite: https://www.mediafire.com/file/yge3smeon4kpxcg/Square.png
β The complete code: https://pasteb...
watch this bro @whole wing
thanks I will
the issue that I currently have, is I followed another tutorial, however, my character is simply flying off the screen
oh yeah i had that problem
check this video it will help, the problem is the fact that clicking space won't stop jumping(Character is flying to infinity)
@cunning kraken
kinda funny
nvmnd fixed it
Heyy all, anyone experienced with Sprite Atlas that can give me an anwser?
Cheers,
SE32
https://stackoverflow.com/questions/76488695/my-sprites-dont-fit-in-a-single-4k-sprite-atlas-what-happens-with-the-remainin
https://i.gyazo.com/3329293af0b92bf6ec443d8fb8b5d113.mp4
I tried to add a whole frame by frame animation clip to a Sprite Atlas but I don't want to ecceed 4K resolution. Do you think it automatically
Anyone knows why this looks like low resolution?
Doesn't seem like a Unity question
Probably an UI scaling problem in that particular program
as far as making geometry for your sprites after giving them bones, I've done that for a test character, and as soon as i add the sprite skin component and try to generate the bones, the sprites end up disappearing. Any known reasons why this happens? It has only started happening after scaling down the test sprites to be below 100 pixels per unit and made sure the auto geometry fit exactly on
Does anybody know why THE DAMN BLOOM ISN"T WORKING
Looks good on edit mode, but doesn't show up on camera
does camera have pp enabled
not sure which channel to go to but i have a tile map and i'm not sure how to make it seamless between multiple patches because on the left it leaves a gap but on the right it just doesnt look seamless
like is there a way to change the moving increment or somethingm
Do you get any console messages, either when you generate the bones or when you save changes to your Sprite?
Your geometry has weights applied?
what ?? are you being serious
It does sound like a serious question
wtf is pp tho
Post processing, including bloom
it is enabled
anyone know what's up?
I see your scene is composed of Canvas objects
By default Canvas is set to render in Screen Space - Overlay which means after post processing
Screen Space - Camera or World Space would be rendered before post processing
Scene view renders all gameobjects in its subjective world space which explains the bloom working there
@modest cargo Fixed, thank you a lot
Can I convert this textue into the sprite?
why is my imported asset becoming like this?
it is nice and clear but after importing it becomes low res and kinda distorted
i fixed the distortion by using the crunch compression but still the image is in very low quality........
Send me a screenshot of ur sprite settings
ill tell u
Also, guys, how do they make these pixel art health bars? It turns out it is way harder than usual. How can i create a slider that is made of 6 segments and if u get damaged u lose 1 segment
completely white and partially transparent material is not giving a white tint what do I do
can anyone help me? im stuck at the start of making my first game coz of this.
Lossy compression will give you artifacts. The only surefire way to avoid it is to use uncompressed textures, or choose a compression option that looks the least bad.
how do i do that i just have this extract option only
What
Try searching for how to disable texture compression
Even searching for "pixel art looks wrong in unity" you'll probably find that and more related potential issues
this thing
Could say that
Are you just going to go down the list of active posters, hoping someone will tell you what you want to hear, because you can't accept the answer?
are you serious right meow
I tried doing what you told me, was not helpful
@modest cargo can you help?
It was a correct solution
That's if you must have particles in UI/Canvas space
Better to first go with the second option and use a world space canvas or screen space - camera canvas
Particles are sorted using 3D and 2D sorting
Canvas is neither by default which makes it incompatible, but can use 3D sorting for it with those options
@modest cargo Particle system shouldnt be a child of canvas? or it should be
And my game is entirely 2D
Entirely canvas
Should not
Only UI gameobjects under Canvas
Canvas is not the same as 2D
understandable
In edit mode they are visible
Although in game mode not at all
They are outside of canvas
@modest cargo
should i create another camera or some shit
No
What is the Render Mode of your canvas right now
Scree Space - Camera
Good, world space may be more intuitive but they do the same thing here
You should be using the scene view to make sure the UI and the particle systems are in front of the camera physically, not as a reference how things should look like
The particle system should have a Transform, not a Rect Transform (which is an UI thing), and it probably shouldn't have a scale in the hundreds
What's confusing you here is that Canvas treats units as pixels while particle system treats them as meters and by default are rendered entirely separately from each other
well thanks although the z axis of the particle system is actually okay
particles are in front of the camera (in 3d space)
is that changable?
Camera space and world space mode should effectively change it
shoudln't have hundreds?
so you want me to make them normal but zoom in?
Well, it depends on the size of the ortho camera but usually it's not necessary
What often happens is people assume objects need to be scaled up into UI space and then they wonder why they're wack
hey. anyone can help me in tilemaps? i want to add different tile elevation levels like in isometric tilemap but instead in a rectangle tilemap
i did a small project where the ground and water on a different levels but adding a higher tile will probably break everything if i use a layer
To best of my understanding you'd do all the same steps as with an isometric tilemap detailed here, but without chaning the grid shape or using diamond shaped tiles
https://docs.unity3d.com/Manual/Tilemap-Isometric-CreateIso.html
It's the custom sort axis and adjustable tile height that makes the perspective effect
Ok, I wasn't sure where to ask this. But what dimension would I build my map in if I want to achieve this look of game. It looks like the character is 2D but the map is 3D?
Looks 2d to me
That's what I was thinking, but how would you make that in 2D?
How would you get the depth from the walls? Unless I'm just an idiot lol
I don't see any depth.
The 'walls' are just differently colored floors with colliders so you can't walk on them.
Using custom axis sorting so that stuff closer to the bottom of the screen is drawn in front
Hey thanks for the reply. I followed the instruction but it look like z position didnt converted to y position.
i tried it in isometric z as y and everything work perfectly. i cant find any clue :S
How do i make the assets fit in cells ? I'm using rectangular 2d grid tilemap
this is what the other palette looks like (it's what I want) but I don't know why the terrain palette looks like that
set a proper PPU (pixel per unit) on the sprite asset
Might just be a "have you tried turning off and on again" type of issue
can someone help rate my animations?
What do you mean by "rate"?
do i need to redo like 200 of my pivots to achieve proper layering? I was hoping I could change all the pivots at once but I cant open the sprite editor with multiple selected they arent on the same sheet or something, aseprite makes them their own image
You could use a script to mass edit them.
I found a decent way to do it, I dont fully undersatnd pivots yet. So when I change my pivot to the bottom of my character instead of center my characters sprite moves up. Can I change the pivot without changing the position of my player sprite, I know theres some settings causing it to happen just not sure what
do i just need to reposition all my child objects and colliders?
Not sure how to explain this. On the left side of the door, my character is sorted higher in the layers than the walls. But If I want to make the character walk through the doorway, and then have the walls be higher in the layers, how would I do that? If possible?
The walls probably should be on the same layer and the character is sorted above them correctly if you have your sorting axis and pivots correctly set up
The amount will always be exactly the distance you moved the pivot, so you can automate the correction.
how can i make the player render behind the bus stop? Im using URP
i thought this would work but it doesntr
put a custom axis (0,1,0) in the transparency sort mode and then set your sprites pivot points where you want them is a good way.
what if theyre in different sorting layers? would that affect the sort mode?
yes, layers overrides it
ah damn
you just want the player behind the bus always?
or you want the player to be in front or behind depending on where he is?
yeah this, its just because i have a different sorting layer for everything for easy sorting
i want the player to be in front or behind depending on where he is
guys I want my 2d character to stand on my tile and it works when I drag the prefab to the scene but when I drag the tile from the tilemap my character falls down and I made sure to put the same object I am confused 
help my poor tilemap
i want that to fill the entirety of 1 square
scaling both the grid and the tilemap seem to scale the squares AND the space so my tiles never fill 1 square
Did you change your asset PPU size?
You probably just started using unity, so it's pretty easy to fix this.
First of all you have to go into your assets folder, then search for the image that you want to modify, and then click on it.
I'm seeing that it's in the files called "images".
Just click on that texture and search for a feature called "pixel per unit".
Then just put the number of the pixels of the width of your texture and it should work.
Usually I put 32, but you will probably need to put 16.
Btw if you need some help with learning unity I can show you the tutorial that I used to learn making games.
How do I make the Back_Light photoshop layer appear in Screen blending mode in Unity? (Similar like we have blending modes in Photoshop - Normal. Multiply,Overlay, Screen etc, or similar like in CSS blending modes)
In this case, I want the BackLight file only to be in blending mode
@solar nebula @still tendon ty for the help yes i think it works now
i wanna use this as an asset but how do i remove hte white background
like make it transparent
Don't crosspost
yh dw i thought this is the chat to ask in then realized it was art asset
forgot to remove the quesiton
I'm trying to use the 2d URP pipeline and add text. My content, which is full screen, is way down there in the bottom left and the text is massive, but when I hit play everything lines up. this is weird. How do I fix it?
got it, changed the canvas to world space. can scale it down now
You'd use a different material for that specific sprite and use an additive shader.
please help, I'm making a 2d game on unity.But I don't know much code, can someone help me?
You can get advice but no teaching or tutoring
Does anyone know why are the tiles so small? They were connected and filled the entire square and than I placed in the tree and it changed it to look like this
Don't crosspost please
Sorry, I just saw that people asked about tile palettes in here so I thought I'd ask here as well
You were warned about crossposting before
If I had than I don't remember, the last time I went into this server was a couple of months ago
The simple way is to edit your BirdScript so it listens to that input to call the startGame method
Additionally UI supports keyboard navigation, for example by default you should be able to move between interactabe UI elements with arrow keys and click on them with enter or space, once the UI is focused by clicking on it
Yes
Sprite editor is for sprite assets
To change pivot via hierarchy you'd parent it to an empty gameobject with an offset
Transform positions are relative to parent transform, so you'd move the gameobject relative to parent gameobject
the pixels-per-unit setting when you first import the pictures. Set it to a smaller number like 32, that was my issue
can anyone explain why in the editor my screen looks like this but looks like the 2nd image at runtime? Does the white box not represent the screen?
Thanks but I figured it out, it had something to do with the palette settings
It might have something to do with your camera size
I just realized my real "screen" is a small box on the bottom left and my UI just happens to scale
The UI is in different units from the 3d 'world.'
That is, for UI one unit = one pixel, for the world one unit = one meter.
Hello, does anyone know how to make this effect? I think they used two sets of wave animation. I did the alpha waves, the outer part. I think those two wave animations are blended with alpha blend. I'd much appreciate it if anyone can give me some directions about this
By wave animation i mean the animation tiles. I'm using tile palette on my project
I added the second wave animation(the inner one) but the two doens't blend, there's space between two tiles.
there's an xcf file which is called alphablendwaves at the site i downloaded this asset. I think it has something to do with that file but i have no idea how to use it. No one says anything about it on the site either
I have two sprite sheets for the wave animation, one is alpha and the other is regular. How do i need to use them? I can't find any information about this anywhere. I think in order to get the effect in the ss, i need to use both of those tile maps
when 2d rigging in unity, is it possible to have the sprite also be animated? can i make frames for like a burning hand and then use that sprite for rigging and still have it animate the fire? @late tree if anyone know π
I believe with 2D rigging you're meant to use Sprite Swap / Sprite Library to swap rigged sprites, such as for frame to frame animation
I believe that the original is animating the indexed color palette for the secondary animation.
I think it's just a frame by frame animated tileset
does anyone know how to make a tilemap a sprite mask, its driving me up a wall, I just want the water rings to appear on the water tilemap but they love jumping right onto the sand. I figure a mask is the best way to fix this.
what is the xcf file for? And there are two sets of sprite sheets for wave animation. One is named alphawave, the other is just named wave. It looks so good but i can't find any information anywhere to use them in the proper way. I just used the alphawaves sprite sheet with animated tiles as shown in the ss above for now. Are those two tile sets(alpha and wave) should blend in some way?
yes they are. But as i said there were 3 files i downloaded. alphawave.png, wave.png, and alphablend.xcf. There are no instructions on the site on how to use them the right way. This is the link to the asset page: https://opengameart.org/content/animated-ocean-tileset?destination=node/81757
This is my derivative of Leonard Pabin's animated ocean tileset. Here's the originalΒ https://opengameart.org/content/whispers-of-avalon-animated-ocean-tileset Changes: Doubled the frames from 5 to 10. So it's a smoother running animation now. Added a shallow/deep effect and recolored it with my extended DB32 palette. I remixed this years ago so ...
Xcf is Gimp's native image format
The frames are stored in a horizontal row in the png files
The alpha png has transparency, the other png does not
You would slice the sheet by grid size in Unity and assign resulting tiles as an animated tiles' frames
i appreciate your answer but i already know all the things you said. I didn't ask the descriptions of those files, i asked how do i need to utilize them in Unity to create the water animation effect which is shown in the gif file i shared above. Should i import the xcf file to Unity? In what way should i use the alpha and the regular png file? I'm sry if i wasn't clear in my previous questions
I know about the animated tiles too, i already used them. I shared a ss of it, but it's a still image so you can't see the animation there
Xcf is not Unity readable, it's just in case if you want to edit the file in Gimp
Whether you use the alpha or non-alpha variant is up for preference, for if you want the water to be translucent or not
Hmm beyond that I'm not fully understanding what's the exact thing you're asking about
This is only the shore wave animation
The asset description links and recommends you use another animated tile for the surface waves, to be placed under these shore wave tiles
i opened it on GIMP and then exported it to PNG, then imported it on Unity. Do i need to use that file in any way, or is it just a demonstration? I can't figure out it's purpose
You don't need it at all
so i don't need to use them both, they're just variants. Thanks a million man, that's what i needed to know!
i know, making the water is the 2nd step
this is the animation i made. It felt kinda different than the animation which is played on GIF, i mean just the waves. Have you noticed anything wrong here?
Animation doesn't look any different, but the visual appearance is altered because it's lacking the water and shore tiles below
i know i asked a lot but is there a trick to close the gap between two tiles, like this? I tried to change the layer of two tilesets and place the water tile behind the wave but it doens't work since the wave sprites are transparent
It's to have a non-animated shore tiles that transition water to ground or vice versa
Then the animated tiles on top of them separately
i don't think it would work as long as the wave sprites are alpha. Even if you place other sprites under it, it sticks like a sore thumb since it's transparent. I tried it, looks terrible. Dammit, it took to much time for me to create those animates wave tiles
Well it seems to work okay in this example
In this gif, i think those wave sprites aren't transparent. They set the tile map of the wave to a upper layer and the water tile map to a lower layer. That's why it looks right i think
They're transparent but not semi-transparent, so it's the "non-alpha" Waves.png
The animated wave tiles are still similarly drawn on top of non-animated shore tiles that connect the ground and the water
yes, that's what i'm saying. I used the alpha variant in my project. This is how it looks like when i try to do the same thing
This is not the same thing because you don't have shore tiles
how should i set their ordering their layer, bcs i tried that. I did it like this before wave= 2, shore = 1, water= 0
Do you have the shore tiles visually connecting snow and water? I'm not seeing any
i don't have a specific shore tile. My game is set in a snowy enviroment. I place the white snow tile on top of the wave. I think i need to adjust it's size. When i place the water sprite on the same tile, either it or the snow is overlapped depending on their sorting layer
With this type of wave animation you need a shore tileset as well
The wave is not designed to sell the effect alone
whaddya think now?
still not great, but definitely better than before. It would look much better if i give the corner beach tiles a curvy look on PS
you're in the wrong channel, you need to post this on UI-UX
oke thanks
Hmm it doesn't look much like a visual transition, rather just squares of sand
i couldn't figure out how to do that yet. I need some videos or instructions about that. This is the best i can do with my current skill level. This was pretty exhausting, this whole 2d water animation thing, there must be a better , easier workflow for this
Yes, you'd only need a shore tileset, which could be animated
This animated wave layer technique is extra on top of that
I have an image on a canvas and it shows in the scene view, but not the game view. Anyone know why this could be happening?
why is my art in game pixelated? the PPU is 200 and the rest of the sprite editor is pretty much default
try changing the render mode to screen space-camera in the canvas settings. And this is a UI question, post questions about canvas on the UI-UX channel next time
set the ppu to your sprite's native pixel size, set filter mode to point(no filter), set compression to none in the sprite settings
This sounds like a vague question but this is me being unfamiliar with the Sprite Editor. How should I slice these so that I can get each and every one of these sprites?
Like, what's my best option here?
Hello why is my assets looks so dissarray like this?
But the other one is complete like this?
how do i find the sprite native size
just hover on the file and look at the dimensions, you'll see something like 16x16
help i sliced a tileset and its stuck for 20 mins
Assigned a quest for the NPC but npc does not respond when i move the player to the NPC. what is the reason for it.
ok i will check in a bit
Does Unity 2d not support skyboxesοΌ
Every sprite in the broken one is being sized automatically to fit the biggest object, which is the tree or the boulder
I fixed it by restarting unity
Grid by cell size or grid by cell count π
I canβt see the inspector or the code
Might be able to help if you show those
Depends what you mean by "unity 2D"
Unity doesn't functionally differentiate 2D and 3D graphics, except with URP 2D renderer
It looks like the URP 2D renderer does not support using skyboxes
which, I guess is understandable
It doesn't support anything not explicitly made for 2D
I mean that's not entirely true is it, you can have 3d models and use 3d shaders, 3d particle systems etc.
3D shaders will not work, but if you slap a 2D shader on a 3D mesh then it'll work, sort of
Particle systems are designed to work both in 2D and 3D, but it also requires correct shaders
Sure
Unless that has changed in a recent version
someone please hmu if you can help with a simple problem iβm having with a timer
Speaking of, I haven't had any luck using pixel position in my 2d shaders, is that actually not available?
It's easier if you post the question directly
k one sec
https://docs.unity3d.com/Packages/com.unity.shadergraph@13.1/manual/Screen-Node.html This node should let you figure out pixel positions with some math
Ah, that wasn't the type of thing I was attempting. I meant more like
basically limiting the shape of the mesh
9 minutes 15 into this https://youtu.be/HmHPJL-OcQE vid, he drags a text component into the script. Does that sort of text not exist anymore? iβm using text mesh pro and itβs not letting me drag it in
In this step by step guide, you'll learn how to make a Countdown Timer in Unity and how to display time in your game in minutes and seconds.
00:00 Intro
00:25 Basic timer in Unity
01:49 Adding an if condition
02:43 How to make a repeating timer
03:35 How to display time in minutes and seconds
09:33 Time elapsed vs time remaining
11:43 Adding mi...
sorry iβm a bit clueless as just starting
The "Text" component was changed into something called "TextMesh", although you can still use "text ( legacy)" for the old version
Limiting how exactly?
Shaders run per vertex, then per fragment so you're more or less always working in screen pixels
like i said iβm using textmeshpro, trying to drag the text into the slot and itβs not letting me
When you defined your "timerText" variable
you probably defined it as "Text"
one sec
Those clouds are actually spheres or cubes, but the shader digs into the shape by altering the position
Is this the desired effect, or do you want to do something to them?
They are not my clouds, I simply wish to do something similar but for 2d sprites
blue do u mind if i send some code in dms?
but yeah, it is the desired effect
You can, but you can also just send it here
just the variable declaration is fine
public Text timerText
see, that is declared as "Text"
what should i change it to?
So either the text you want to put into that has to be of type "Text"
or you have to change that to "TextMeshPro"
ok sweet iβm using tmp so iβll use that
note that when you're changing it to textmesh pro
some of the code might have to be a bit different to get the same result
k sweet might take this to chatgpt
If you're using TextMeshPro for UGUI that is TextMeshPro_UGUI
if you're using world-space text that's TextMeshPro
and TMP_Text works for both.
Hmm you could look into using this exact type of shader with 3D meshes
Should work even in 2D renderer as long as you avoid specific 3D only functions, like lighting for one
Something similar in 2D would be very different, I'd consider overlaying multiple could textures with clipped alpha
chatgpt fixed it i think
Sure those aren't prebaked meshes? They look a lot that way, and it'd be much easier to do it that way
https://www.youtube.com/watch?v=3pvWCJffNHE
There's a bunch of similar ones too
Hey, this is an update on my cloud shader. #unity #madewithunity #volumetricclouds
Previous Versions (those posts also share a bit of information on how the cloud shader was made):
https://twitter.com/EuriGilberto/status/1406141214907326465?s=20
https://twitter.com/EuriGilberto/status/1402737376292704256?s=20
https://twitter.com/EuriGilberto/st...
Ah, raymarching
thanks blue n vertx working now
I guess raymarching doesn't make any sense in 2d because the camera is ortographic and peripendicular to the sprite
I expect it'd look very different anyhow
The problem is more that sprites don't have any depth
they are 156 x 142 so what should i do
is it diving the Y of the image by the total height of the camera size
only in game view the art is pixelateted
scene vs game view why do my sprites get pixalated
Sprites too small relateive to screen size / camera size
set the ppu to 156 pixels in sprite settings
ok
I'm out of the loop there but a reminder that PPU is a convention for you the developer to know how many sprite pixels will be in one unit, so by knowing how many units the camera size is, you can figure out how many pixels and sprites will fit on it
so it is default 10 right?
I think the default is 100, but it doesn't really matter what it is
it is still pixelated though
Tea said the sprite looks pixelated, i tought if the ppu is set to the native pixel size of the sprite it could solve the problem. Maybe i'm wrong
It could, but it could also make it worse
PPU should be the native height/width if that size is intended to be "one unit"
There's no hard rules for any of that though
Sprite pixelation ultimately is because the sprite is too small relative to screen pixels
PPU and camera size are ways to standardize the sprite's effective resolution so everything is predictable and sprites are consistent with each other
i also told @clear barn to set the filter mode to point(no filter) and the compression to none
the fitler mode is point and no compression
PPU is 156
it is a multiple sprtie though
u mean a sprite sheet? Then you need to select multiple on the sprite mode dropdown menu
i know but will that affect the pixelatedness
It won't
ok
But the 156 number seems to include more than one sprite in that case
yeah thats what i mean
Which makes it unlikely to match any intended PPU
like will i need to change the PPU for mulotiple sprite
this is my sprite that i am using
PPU should always match with how many pixels you want to display per unit
All sprites should share the same PPU if you want them to be displayed with the same resolution
Trying to match all sprite resolutions is an optional step though
If your sprites are pixelated that means they are too small relative to display resolution
Increase display resolution, decrease camera size or increase sprite size
There are no hard rules for it, like I mentioned
Usually you first decide how many units you want to display at once and what size your characters should appear on screen
This mostly affects only the scale dependent calculations you'll be doing in code, and physics
ahh i see
I find it easy to use a one-unit default cube as the character size, that gives you and idea what other objects like walls or NPCs should be compared to it
At that point when you tweak the camera size you decide how many units will be visible, and how small they will be relative to camera
How big the camera is determines how far the player can see, but also how small the art will appear as
interesting
Sometimes you decide on multiple acceptable sizes if your camera will have multiple zoom levels
And when you look at it from the Game window it's important to test the resolutions your players will be using
i cant change the camera size
1920x1080 is the most common one but laptops and mobile devices may have smaller resolutions
Is it perhaps overridden by Cinemachine or Pixel Perfect Camera component?
With Cinemachine camera size is controlled from virtual camera Lens settings
But it's the same otherwise
Now since you know approximately how many pixels tall and wide your character will be on an average or below-average monitor, you can use that as a reference so you know how many details you can realistically fit into the art
Now since you know how many pixels there should be per unit, that gives you the Pixels Per Unit value
Since you aren't working on pixel art, you'll probably want to draw the art in double resolution, and double the PPU as well
If you need to display art in different sizes, doubling or halving the size/PPU works best
Non-integer scales will be extra blurry (or pixelated, if mip maps are turned off)
@clear barn Since you aren't working with pixel art, try setting filter mode to bilinear and enabling generate mip maps
i dont see a generate mip maps
ok i will
set fiter mode to bilinear
That could be pretty important
Show the import settings?
Under "Advanced"
Guys basic question how do I put my tiles with tile palette in their original size instead of this bigger blurred version I drew them 32x32 on aseprite
ahh ok
You'll want to use point filtering instead of bilinear and disable compression for pixel art
WHERE IS 3D TOOLS
hey i got smthn i need help with
how can i deal with sprites that have different dimensions
like when i splice these sprites the individual sprites have slightly different dimensions
when i animate it it looks as if the sprite went slightly up
i was told to make a bounding centre or setr a correct pivot for each sprite
but how can i do that?
stupid question but how can i make a 2D right triangleπ ?
Literally every channel but this one and UI.
You make sure that one corner is 90 degrees and the rest just kinda happens?
hm
how can i get rid of any artifacts in sprites after i already animated them?
Why the sphare sprite in unity is pixilated
i've made a level using tilemaps, but i want to change the texture of the ground tile, how can i do that easily without having to manually overwrite each tile by hand?
All sprites in unity are pixelated.
How do you get your tiles, using a Tilemap collider 2d and Composite collider 2d, to take up a full square?
\
Hi, I am currently working on an animator tool made specially for pixel art. And I am kind of running out of cool useful ideas that I could add to the tool.
I obviously have basic features like animating the sprites and playing events on given frames. I also have some more complicated stuff like animating colliders and hitboxes.
If you have any ideas of cool features that I could add I would really appreciate that.
Nevermind this, it seems like I needed to set the sprite type on the TILE (to Grid), not in the sprite editor.
Not sure if you have it already, but frame flipping (per frame), animation previews, and onion skinning would be great additions to a tool like that, if it's what I'm thinking it is.
why would you need frame flipping per frame? I have never seen anybody do that. And I already have all of the other stuff, thanks for the suggestions anyway.
Idle animations for some games use it, especially games made in GameMaker for example. It's a bit of a relic of an older era, but sometimes you might want a single sprite to have a "confused" idle, flipping each frame. Just one example.
Old pokemon games use this a lot.
Helicopter blades. You might flip those each frame to give the illusion of movement. Wheels.
but I think in that case its more so designed in the animation sheet itself than in the animator
If you support layering I'd include it, depends on the game IMO.
Modular spritework is becoming more and more of a thing, layers help.
Anyway good luck finding more suggestions.
yeh layering could be useful hover my tool is made in mind with traditional pixel art animation so I am not sure how important of a feature that is
I'm exporting a tilemap into Unity from Aseprite, but it seems to be blurry. First screenshot is what it's supposed to look like from Aseprite, second image is what it looks like in the Unity Sprite Editor. Third image is the settings, I only changed Sprite Mode and Pixels Per Unit. I did also try it with Pixels Per Unit as 100, from the recent tutorial I just found, but then I tried it with 16 (what it's currently set to) because I think I remember a previous tutorial saying to do that for 16x16. Both settings (100 and 16 Pixels Per Unit) result in a blurry image. Is it an issue with Unity or exporting/importing, or an art issue maybe? This is my first tilemap.
set filter mode to point in sprite setting
Great, thanks.
i notice that in some of my sprites after i animate them there are some small black lines
how can i edit each sprite manually to get rid of these lines?
Artifacts found in sprites
Hi guys ... I switched from 2D animation 7 in unity 2021 to version 9 in the 2022 LTS (new project, clean install). The sprite skinning editor seems to be completely broken now. Did they change the UI or buttons I have to press? For example rotating bones in preview pose should just be select and move, shouldnt it?
None of the tools seem to work correctly. Only thing I can do is select sprites. And i get some weird blue selection boxes which do not really follow my mouse cursor. I dont know if its a bug or if I am missing something
Yes, the current version of 2da is basically unusable.
Thank you. I love Unity π
Breaking basic tools in the newest and "stable" version of the editor ... Thats a very sophisticated way to steal even more of my time
Are they aware of it?
I have never made any 2D art, but this time for my game I want to make some.. but I can't figure where to start from.. anyone can guide please ?
hi
how i make a farm system in tp down game
theres a bunch of ways to make a farm system
also this isn't exactly have to do with 2d tools?
Where can I ask
Can you give me some resources or videos
how do you want the farm sistem to be
thanks
It's a very broad question. You should lookup a tutorial for it, or create a thread in #archived-game-design if someone wants to invest time in developing one for you.
like Add seeds and water and wait for it to grow
Thank you very much, it doesn't matter just send it
i have no code to send
aaa ok my bad
why is my sprite deforming this badly
^ fixed it by using cinemachine pixel perfect camera
is there a way i can replicate this animation in unity?
Hi. I'm trying to splice a sprite. However, it is not working as I would like it to. I use this black with white border sprite, invert it and use it for alpha in shader. But I want scaled objects to maintain the same border size and not stretch it. To this end, I moved the green borders in the sprite window. However, as the third image shows, the longer one has a stretched bottom border (both rectangles start at the same y). Finally, here are the properties of the rectangle gameobject. My question is straight forward; what am I possibly doing wrong?
is there a way i can replicate this
I found out that I need to change the width unnder the splice property of the gameobject (in the last image)
i need help
my problem is at this thread
Unsure of where to ask this but if I wanted to make a wall 2D and my player is layered above it (when standing in front of it) but layered behind it (when standing behind it) how would I do this?
The common solution is to use a custom sort axis and to manage sprite pivot points so that sprites are sorted by Y axis relative to each others' pivots
But it depends on what kind of perspective your 2D sprites are emulating
is it possible to mirror down the middle?
This is the perspective
Why does Unity adjust the colors on my pixel art?
It didnt feel like too big of a deal in tilemap, but its gonna cause issues for characters like this
perfect thanks
is there a way to copy paste my tilemaps through scenes? Because when i add a new feature to level i dont want to do that in every scene, so it would be easier to just copy the level tilemap to another scene
level example
I would try making a prefab of the grid and tilemap components
is there a chance you can explain it more? i watched some prefab tutorials but i still dont understand the point
its like applying change to other objects but i still dont understand how can i use it
You could think of prefabs as "linked copies"
Each instance of a prefab syncs their changes with the main prefab, aside from local overrides
This makes it very easy to have the same gameobject in multiple scenes, even with individual changes
I don't know if a tilemap's tile layout is considered one singular property to override, but regardless making a prefab of it (and optionally then unpacking the prefab) is just a quicker way of copying it to another place
But then again you could also just simply copy and paste the gameobject
i tried this, because this is the easiest solution but it copied just 1 tile
I mean copy the whole gameobject including grid and tilemap components
Still just one tile carries over?
no, i can copy whole level, i didnt know it has so easy solution
thank you
What are you talking about?
is there a way you can change the individual x and y axes of sprites?
like of keyframes?
What do you mean by "change axes"? From what to what?
You mean flipping them?
I'm having issue where the box showing where you are going to place it, and the grid, is offset to the actuall tilemap
Any ideas to fix?
im trying to place a pillar among my floor rule tiles, but it is trying to build walls around my pillar even with using override rule tiles
Put the pivots in the center of the sprite?
like notice at one point the character's sprite moved as it got out its sword
how can i change that without having to go back to the sprite editor?
You can have a keyframe for every different sprite to offset its transform position
But that's not at all easier than fixing the pivots in the sprite editor for good
heres the thing
how can i do that exactly?
The blue circle is the pivot point in the sprite editor, move it to a point in the sprite that's unchanging relative to character's body
i see, im so sorry for asking a lot of questions
i hope it doesnt bother you
https://gyazo.com/3d129dc01f6bf25e38b371805c01a25d how can i fix this ?
I really don't understand the purpose of rule override tiles,
my screenshot shows my rule, and override, the rule tiles are auto tiling around the override tile
I expected the override to let them function together but have a different sprite, like having floor tiles and carpet tiles that know they need walls around them but dont interact with each other
this behavior implies the rule and override are independent, the same effect being achievable with a copy paste of the original rule tile, which makes the override absolutely pointless
did you end up finding a solution?
quick question
how can i make it so that when my character walks up and down a slope, even a small slope, the character rotates accordingly
because its fine if the character walks up said slope
but when i make it walk down
it keeps switching between moving and jumping animation
any tips?
Yes, first thing I did was to ditch the abysmal Unity tiles system altogether and install Tiled which is a specialized editor just for tilemaps as well as SuperTiled2Unity which is a package that automagically exports Tiled files to Unity. Now, the workflow of using Tiled and exporting to Unity is like 5x more convenient and less annoying than using native Unity tools.
For the specific problem I had, I ended up just adding a new layer for the second type of floor tiles and it works fine.
after a month of using this workflow, I can say there are no problems with using multiple layers, I ended up having even more of them
absolute legend, thanks a ton
This has to do with how your ground detection works when trying to differentiate grounded and falling states
You'd need your code to either detect floor slopedness or recognize slope gameobjects, and modify the rotation or animation accordingly
heres the thing, my character has a box collider and the slope has an edge collider
Right, and?
just thought to clarify that
There's many ways to do ground checking and it doesn't strictly matter what the ground or the character are in that equation
The purpose and value of rule tile overrides above just making another rule tile is that they consider the tiles from their base in the rules. So there may be situations that is very helpful... Like a wall in a 2D base building... If you have a stone wall you could upgrade to metal and the corner will remain a corner and not turn into an individual tile if it is the only square that gets upgraded... If that makes sense.
So I feel like what you are expecting is how it works maybe you are using a different layer?
Hmm I just opened my 2D base building project from a while ago where I thought I had this set up but it seems I made my own custom ruletile class lol... Maybe that's why.. π€·ββοΈ
@bleak flume yes the way you describe is how it should work, but if you place the override tile down beside the base rule tile, they failed to connect, just like in my example, when ticking the 'this' or 'not this' the override tile isn't considered 'this' for either the base rule tile against the override, or the override against the base rule
so my use case was using unitys default custom rule tile, which provides 2 additional ticks to cycle through, which includes 'null', and 'not null' simply for the rule tile to check if there is or isnt a neighbor tile, not if the neighbor tile is or isnt itself
Hi there, i have a question about the Tile Palette window, i loaded tiles into it and can select and paint them, though the palette window itself stays blank..
i drop the tiles in, but it stays blank.. i can select and use it, but it's hard to find the correct tile if youcant see the preview in the selection window -.-
version is 2023.1.3f1 but i had the same issue before updating from 2022.3
i found multiple threads and posts about this issue from several earlier versions, up to 2019..
i cant imagine the same issue being in unity for more than 4 years, with tilemaps being the most essential tool for making 2d games
i found the issue for the blank palette, i accidently set the cell sizing to manual and it probably was 0,0 or something similar shrug
Ahahahaha
Only 4 years 
Why is the outline component not working?
Artefacts are being created in my sprite atlas! How do I fix this? Namely around the health bar. it's fine without
private void MoveShoot() {
Debug.Log("Ur shooting while moving!!!");
timerIsRunning = true;
seconds = 2;
animator.SetLayerWeight (1,1);
newProjectile = Instantiate(bulletPrefab,firePoint.position,firePoint.rotation);
if (timerIsRunning)
{
if (seconds > 0)
{
seconds -= Time.deltaTime;
Debug.Log(seconds);
}
else
{
Debug.Log("Ur done damn");
animator.SetLayerWeight(1, 0);
seconds = 0;
timerIsRunning = false;
}
}
}
the "timer" only decreases everytime the method is called
and mind you this method is called at the update macro:
if(Input.GetKeyDown(KeyCode.X) && animator.GetFloat("Speed") > 0.01 && animator.GetBool("IsInAir") == false) {
MoveShoot();
animator.SetTrigger("isShootingMoving");
}
any tips?
I'd ask in #π»βcode-beginner instead
with a rule tile, how can I make it so it aligns to the bottom of the tile?
I have these shorter tiles I want to use for flooring
ok then I just had to change some alignment things
weird
Making my first menus + HUD, question is, do HUD/Start Game Menu/Settings Menus go on separate canvases or the same canvas?
Im assuming same canvas?
As far as I know it usually matters little
When one part of Canvas changes, the whole thing must be updated which means for optimization you'll want to separate UI elements logically into multiple Canvases when you have some parts that refresh often
I'm not an UI expert though, they might know more over at #π²βui-ux
oops, shouldve scrolled down a bit more to find that channel lol
I'll post in there, but Im thinking Ill just put them on separate canvases. Makes more sense, organization wise
Why does one of my box colliders have this sweet little "transform" button, but the other one doesnt?
this is what I mean by "transform button"
It's called the "Edit Collider" button, unsurprisingly
If you click it you'll notice that you edit all colliders at once, so additional buttons are unnecessary
Ohh, I didnt realise that I can change the second box collider by using the first button, Thanks.
how do i rotate the tilemap so i can plaint the bench but just rotated
It looks like you already did it?
ye but it was paintfull and i couldnt like use it as paint
can you help me with the cinemachine problem i posted it in the other channel thats what im strugling currently
Hey, I'm using Unity's tile mapping and rules to build a map and I use a different tilemap for each room in my game. Is there a way I can fix the edge case where the edge of the tilemap doesn't necessary mean the edge of a tile usage? For example the blue box and red box?
I understand the blue box, but what's wrong with the red box?
You want the bottom row to pretend that there are more tiles below?
I think the only "trivial" way would be to add invisible tiles in the empty space next to regions you want to connect
You can change the collider to 'none' on the invisible tile's asset
I forget if that by itself will work. If not, you would need to do that + create a custom RuleTile script that checks for that particular tile, which would be more complicated
Correct
This is smart, I'll investigate further
Thanks
Make the tilemap bigger, or just use non smart tiles along the edge
Probably on a second layer
You can use the select tool and alter the rotation of tiles already painted... and then just use the dropper tool (circled in blue below) to repaint with the same settings... or you can edit the palette itself for a more perm solution with pretty much the same methods 2nd pic below.
i been working with the tilemaps and the white boxes dissapeared after i out of bounds?
is there a way to increase the limit the boxes can show? i would like to see it jist for clairity ake
how do i detect/specify collision between certain tiles?
Hey, I am currently doing level design in my platformer game and I was wondering
How can I implement this grid like level design
Something like celeste, hollowknight etc
Hello. I made a tilemap, placed some tiles in it using tile palette. Added a Tilemap Collider 2D but now I want to edit the boundaries of the collision that have been assigned to the tiles automatically. Is this possible?
I've searched online and it says to use the sprite editor on my sprite but I don't have one. I just have one picture, which contains a set of tiles, placed that in the tile palette after editing some settings, such as compression, filter mode, pixels per unit, sprite mode and also sliced it up. Now I am placing tiles from there in my world to create objects.
You may be looking for Tilemaps
Hollow Knight isn't limited to any grid, so if the level parts are rectangular that's simply due to developer's convention to make them easier to slot together
No, i understand tilemap, I am using it,
All I am asking is
Like a rectangular level snapping type system
Just like shown above
Like the bigger grids that are shown in the pic
I can add 1 small level block
And then connect another one with it
I think you are looking for composite collider
No that's the one you use if you have a couple of tiles close together and u wanna mix the collision boundaries automatically to make it more smooth, as far as I know
But I want to edit the collision boundaries myself
Then I think you'll need to add a box collider and adjust its boundaries yourself
I tried that but the box collider doesn't work on tiles I think, the box collider boundaries don't show up
Actually nvm the box collider boundary shows up but I can edit the boundary to only fit one object, whereas I have placed multiple objects using the tiles so I would need multiple box colliders.
You can have multiple tile grids and load them in/out as the character travels
I don't know how to make them seamless though, since rule tiles will not recognize adjacent tile grids
Might be also possible to make a system that streams stored tile levels into one grid

Right, "chunk" was the common term for stored groups of tile or world data, may be a helpful keyword when you research