#🖼️┃2d-tools
1 messages · Page 6 of 1
I'm a fan of tilemaps myself.
Tilemaps can get very technical that's the nice part about them
Open canvas map on the other hand look somewhat better I guess
I feel like I could use both, open canvas for important areas and tilemaps for less important ones like vast lands that are made for farming and combat
Can also have the tilemaps be auto generated so they look different everytime you enter them
It depends on what you're using them for I guess.
true
Your material isn't transparent, so the transparent parts of the sprite are visible.
Did I do a good job with these tiles?
Hello, I’ve just started 2D art and pixel art this week, so I’m looking for advices/thoughts to help me improve 🙂
absolute god tier
Oh okay, my bad
Any reply will be welcome, thanks.
Hey, I know there is some math I can apply to my camera movements and zooms to make sure it never tears my pixel art, but I'm having trouble finding any info about this online, anyone know what I'm talking about?
basically the math for pixel perfect, but I need to make it work for zooming the camera too
As was mentioned in the thread, you can already just create animation clips from a set of sprites.
why does my texture look like this
this insnt how its supopse to look witht he transparency and color
i used asperite and then even used photoshop to save my spritesheet as png
do i have to turn on some setting or what?
Texture compression in import settings crunches up the colors
You can set it to none
hey dude btw
why does the sprite look weird in the game window but the actuall sprite aint like it (the one in the bottom right)
Sprite is too small and your game view is zoomed in
In Unity sprite position, rotation and scale aren't restricted to the pixel grid, but you can't render more detail than you have pixels on screen
What? But I zoomed it out and it still looks like that
O_O let me check that now..
..??? @solemn latch I dont think that user understood what I meant in my request...
but hey, thanks anyways. I'll try his method...
Yes, the cause is not the zoom, but the size
You have to set sprite sizes so they look okay when your game window is not zoomed in
You might get them to look okay, but to get them to look "perfect" you need pixel perfect rendering, or potentially a sprite anti-aliasing shader
I am kinda new could give me just a basic list of the things I need learn to fix anti aliasing, pixel perfect rendering and anything else? Should look into?
The gist of it is that you have to have each sprite pixel match exactly one screen pixel, or some kind of distortion or blurring will ensue, as Unity will not snap sprites to pixels by default
It's not strictly necessary to solve, especially if your sprites are relatively large relative to real screen pixels so the distortion will be unnoticeable
https://assetstore.unity.com/packages/2d/smooth-pixel-209066 This asset does so that you get a slight blur instead of a noticeable distortion, which is may be enough to produce acceptable results in your case
If not, then you must learn how to use the pixel perfect camera component
In essence the component snaps sprites to pixels, and can also emulate lower screen resolutions, but the difficult part is that you need to make sure your PPUs, sprite sizes and the reference resolution match very precisely
https://blog.unity.com/technology/2d-pixel-perfect-how-to-set-up-your-unity-project-for-retro-8-bits-games
Here's an introduction to that workflow
What is ppu
Pixels Per Unit, its significance is explained in the second link
👍thanks bro
btw tried it today as i had to sleep yesterday and it fixed the job
i changed the normalized pivot to pixels and added the pixel perfect component to the camera
wondering how would i make x and z the main axis of a tile map with y as the sorting layer?
I am in need of help for my project. I have a month to work on it and I am overwhelmed with just the menu.
I want an animation to play when the mouse is hovering over a raw image. I am pretty new to coding so I don't want advice where I have to code or else it will be a disaster. I already have all the animations made how do I make the animation play?
Ok thanks
Lines in between tiles when i move?
Dont worry fixed
I put all textures into a sprite atlas
ok i managed to get that working, now i just need to work out how to make my tilemap use integers
they are always .5 off for some reason....
and the placement never matches where the selection box is...
ok i managed to change the .5 issue using Anchor, but now the selection box is even more innacurate, strange
i can deal with this i guess, it is just really hard to think about it, as your brain instinctively assumes the block will be placed where the selection is lol
How could I make the rotation in my game look like what is seen in this image?, I have a pixel perfect camera and my rotation looks as if its normal
these are my settings for my pixel perfect camera
If anyone needs it, I can help draw textures in 32×32 or 64×64 resolution.
!collab
We do not accept job or collab posts on discord.
Please use the forums:
• Commercial Job Seeking
• Commercial Job Offering
• Non Commercial Collaboration
Why is the object orientation not changing when using tilemap editor?
It is correctly oriented outside of the tilemap editor, but not in it wtf
I would assume the "orientation" fields in the gameobject tile properties are the required bit for rotating it
Or the mesh should be rotated within the prefab hierarchy
How do i rotate mesh?
I'm not specifically familiar with gameobject tiles, but it looks like they follow the same logic as prefabs elsewhere
When a prefab is created procedurally, its position and rotation are assumed to be zero
And scale as well I think
Unless assigned at that time (the offset, scale and orientation fields)
This only concerns the parent gameobject of the prefab hierarchy
If your mesh is the child of that, then you can add any orientation to the mesh transform and it'll still be rotated, even if the prefab will be created with 0,0,0 rotation
the mesh is not a child, it is ion the main object itself
Well maybe you should change that
Or have a per-tile orientation in the tilemap
you are correct, in the prefab it is 90 degrees, but after using object brush, it resets to 0
Hi idk why but my collisions doesn't works with tilemap collider 2D
but
as you can see at the right, the contact exists
i try to understand why link can walk over the tree
those assets look... familiar.
Is it possible to change the shape of a ShadowCaster2D with code?
if it's possible, it's not something that's officially supported
Does anybody know how to fix this? I have the tile for the Left and Right but it wasnt work, so I tried Mirror X and it worked for the Ones on top and bottom but not the ones for the Center, any ideas? Im just trying to have one RuleTile for it
why are you mirroring it ?
and why do you have three of the same sprite?
you only need one of them to make the rule tileswork
@errant vigil
hello friends
I've been learning 3D PS1-style gamedev as my first ever experience
I made a little 3D scene in Crocotile which came out quite well, but the sea involves animated UV tiles and when I exported it into an obj the animation was exported as a txt file, which looks like it isn't recognized by unity...
so it just took the animation sheet as texture which looks awful...
I'm very new to this so this might be a silly question but how can I fix that?
thanks in advance! 
(I also have these ugly lines over the 2D bushes that appeared when I changed them to Point instead of Bilinear...)
its not gonna work on the standard shader
you'd need a custom one
this is more of a #archived-shaders question tho
I know that I can cut out frames of an animation from a sprite sheet and turn it into an array from textures. But how can I do the inverse? Turning multiple sprites into a spritesheet?
Do I have to remake the sprites as a spritesheet? They are not all the same resolution
you dont have to do that if you just want an animation
just drag the sprites in the animator
I need it to pick a random sprite for a particle system
then youd do that outside of unity
Okay. Thank you
@agile obsidian I had 3 because of the 2 the one and top and one on bottom mirrored On X, but the middle ones didnt, The problem was I had 2 of essentially the same sprites, but the one on the left and the other on the right side of the sprite, the Rule Tile was picking one for both sides, so I was trying to figure out how to make it work, so I thought I could mirror it, but that didnt work only for the middle ones
You may be able to stop this happening by changing the texture wrap mode from repeat to clamp in import settings, or giving the mesh UVs a pixel or two of margin space at the empty edges
I'm going to try that later, thanks! 
try just with one and idk really know how you could do the flipped for the sprite
One fast question, why when I select different objects, the coords in the inspector are different?(ping me when answering)
@agile obsidian I just changed up the sprites and centered the walls, I couldnt find a work a round so this works
because they are in a different place?
Hi, I’m doing a 2D pixel art game. I have an issue with the camera where it stretches the pixels in a weird way. I know a solution to this is using the pixel perfect camera. The only problem is that I can’t zoom in or out when using the pixel perfect camera, which is a very important part of my game
Is there a way to get rid of the pixel stretch while still be able to zoom in and out?
Or a way to zoom in and out while using the pixel perfect camera?
You can zoom by changing pixels per unit property
Thanks, but I’m trying to do a smooth zoom, and if I change the pixels per unit to something that isn’t a multiple of the actual pixel size the pixels get stretched
I was thinking that maybe I could render the scene with a screen perfect camera, and then just crop it and zoom, but I’m not sure how I could go about doing that
Smooth zoom fundamentally isn't a thing with pixel perfect rendering
It fixes the "weird stretching of the pixels" by preventing smooth zoom or any smooth motion
Is there a way of fixing the stretching of the pixels without using the pixel perfect camera?
You could try this as an alternative
https://assetstore.unity.com/packages/2d/smooth-pixel-209066
I think this might be exactly what I needed. Thanks!
Sorry, I explained it bad. Why the coords of two objets are showed different even though they are in the same place?
Here's the page I'm modifying. What I need is the two stacked boxes on the right to take as much height as possible within the heigh of the scale bar on your left.
The way it's setup right now: My main parent "Detail Panel" contains The vertical layout group (Stretched to the scale height of the scale).
As long as control child size heihgt and witdh is on, it works as expected.
However, one of my children is a box containing text. I need the text box to scale with the text height of course. But I want to have the "house box" to take as much space as it can and stretch down as the text box increases.
And this part doesn't work and creates this strange bug where the main parent thinks the text box is much bigger than it actually is and leaves tons of empty space for seemgly no reason:
Please help 🙏
Are they parented to different game objects?
Are the parents in different spots?
one is the player, and the other is the world, that works with procedural generation
It should be. They are in different local positions, but the same world position.
how can i see the world position, and not the local position
Not entirely sure? Inspector debug mode might show it, or you might need to write a custom inspector.
ok, thanks
I tried it but I didn’t manage to make it work
I want zoom like this
Can you be more specific
It zoomed in smoothly, and the pixels are not stretched or anything while it zooms in
I think it renders the pixels in a pixel perfect grid, and then just crops the image and makes it bigger to zoom in
But I’m not sure how to do that in unity
I mean how exactly didn't the asset work
I’m using URP, but the asset isn’t compatible with URP
While it zooms in, some pixels at the edges get cut, but no pixel is stretched.
I want to know if there’s a way of rendering the screen in pixel perfect, then taking a part of the screen and make it bigger
Thanks a lot for the help by the way
I don't really mind if some pixels get cut in half at the edges, as long as no pixels get streched
Hard to see since the video is so blurry, but I think Celeste uses some very precise math for rendering since there's even semi-smooth camera movements without pixel jitter problems
Sorry for that
It looks like it simply takes one section of the screen, and simply makes it bigger regardless of the pixels
That's possibly easier than trying to get the pixel perfect camera to zoom like that
Yeah
But you still have to upscale the render texture in specific ways to avoid stretching or shimmering of those pixels
How do I upscale the render? That sounds like it's exactly what I need
I'd look into rendering to an RT texture from a pixel perfect camera and swapping to a camera that shows that, on an Image or other type of geometry
URP 2D might have some curveballs for you trying to have a pixel perfect camera with another different type of camera but that will be exciting to discover won't it
I'll try that. Thanks for your help
No silhouette support
Who's using Sprite Resolver in production? I'd love to hear your thoughts on the workflow.
glad it works
Do any of you guys know, why as soon as i turn on pixel perfect camera my sprite starts to jitter like this? Im 100% sure that it isnt gun rotate script, because same thing happens as soon as i turn it off
Sprite positions are floating point values and pixel perfect camera component snaps them to nearest "pixel" position
When you smoothly move sprite transforms, they snap to those pixel positions at different time intervals, leading to jitter
Ive tried with fixed, normal update and nothing works
any ideas how to fix it?
I finally managed to make it work. Thanks a lot!
hi, I don't find where I made a mistake, why the tiles in the left are not set correctly ?
Not sure, it's a complex issue
Damn
So maybe, is there a way to remove the glitching lines without adding a pp camera?
If you mean glitching lines on tilemap, there's two or three different kinds of them which you can fix if you identify the type
Are there any docs about em? Wdym by two or three different kinds
There's colored lines that are mis-sampled from adjacent tiles on the sprite sheet, that can be fixed by adding padding onto the sprites which can be done automatically by generating a sprite atlas or with a tool like Aseprite (or manually with any image editor)
Then there's physical gaps between the tiles which are officially only fixed with pixel perfect camera, but you could decrease the tile sprite PPU just a tiny bit so they're a bit larger than one tile, filling the gaps between
The third kind of tilemap gap is an antialiasing error from using MSAA which doesn't play well with sprite graphics
I'll probably have to make my own docs since this is a very frequently asked question
lmao
Where can i find this function in aseprite
i will try to fix them
File>Export>Export Sprite Sheet ... Borders>Extrude
Note that you lose the .meta slice information when exporting the sprite sheet again if the dimensions change, whereas a sprite atlas will keep the references
I'm not yet sure which is the better workflow
Its late, ill try to fix it tommorow
How did you end up setting it up to work with the pixel perfect camera?
I basically created a Render texture, and make the pixel perfect camera render on that texture. Then I added the texture on an Image, and made another camera render that image. To zoom in or out I just access the canvas scaler to make the image bigger to zoom in or smaller to zoom out
Good to know that works 
You can use the same technique in URP
Yup, it works perfectly
is there a way to manually slice sprites in the sprite editor without it being automatic? cause the automatic one keeps joining the first three sprites together as if they're one sprite
just click and drag
or click on the box and manually adjust how big the x and y are
Anyone got a pixel art of a healer type character that I can use for my uni game project? Thanks
I know there's a site that has images of keyboard keys for stuff like "Press [key] to open inventory" with minimalistic cartoon-ish icons of individual keys, and I forgot that site. And maybe anyone here knows it :\
I have an issue with 2D sprites in Unity since I updated version in my project not being able to get selected in the scene viewport if the sprite has flipped scale values (ex. Z = -1)
I've searched around forever for this. I just cant find anything about it. It seems like something that was "updated" but rather seems like something that appears broken. It's impossible to work in my scenes with this, I have thousands of sprites and can't select half of them.
Does anyone know what's wrong or what I can do to fix it? I've posted on forums before, and other people did as well, without any dev response on it yet.... unity 2021.3.8f1
Need to mention that this worked without issues before. Seems after this version update, it broke. I posted in this thread but nothing on it. (last post solution isnt anything that fixes it either) https://forum.unity.com/threads/selecting-gameobject-with-sprite-renderer-with-negative-x-scale-is-not-working.1192657/
I have not encountered this
2021.3.8f1 is behind many patches; it's advised to update to 2021.3.21f1
You don't have to use negative scale to flip a sprite, and some cases it may be detrimental to do so
For that purpose the Sprite Renderer has "Flip X" (and Flip Y)
yep but I have colliders that wont flip unless using -1 in scale. No other choice sadly
afaik at least
Collider problems are one reason I'd avoid negative scale hierarchies, but if that causes no issues then no reason to avoid it
yeah. How else would you propose avoiding it?
meaning, how would you go about flipping the collider
one thing I had in mind is using two colliders in the prefab and just deactivate /flipswitch one and the other depending on flip status, but it seems excessive (and theres no way to completely mirror the collider that ive drawn in the sprite editor)
Not sure how to do it to polygon colliders
I've always got by using primitive colliders which only need to be moved and rotated to flip them
Tbh polygon colliders for 2D games are very rarely beneficial, since players prefer colliders to be robust and predictable over being detailed, and they're a lot of work to deal with in general
i agree, in this case i have quite a unique game though so it requires polygon colliders :] but ill have to keep looking for solutions on this
I'm sure it's very much possible to use a script flip the points of the polygon collider itself without inverting, either in editor or at runtime
Anyhow if flipping the scale doesn't seem to cause issues with that collider type, there's no reason to avoid it
The selection bug may be improved by updating, or like mentioned in the thread by using a two-sided sprite
It sounded plausible at first but I dont have such a setting in my shader.
(it is basically already two-sided)
It does work though when I switch to another basic shader, like Sprites/Default 😬
(need to use my own shader though). maybe theres some way to make an include?
How can I rig my character? I've tried going to skinning editor but it gives me strange results
hi, i setup a rule tile and it gives me weird results
here's the tileset
and here are the rules
please help
You should be using the skinning editor so it would be more helpful to show the "strange results"
I had a chance to look into it and I do have the same problem; sprites cannot be selected from the back face if they're using a Graph shader
This problem is addressed in 2023.2. alpha, as you can mark sprite Graphs two-sided
yeah but then its still one box and 2 of the sprites wont have boxes
Hi guys, TileMapCollider gives collider according to the shape of the object.
But I want to edit collider shapes,
How can I do that?
In the sprite editor
How do you assign sprites to particle systems
Strange results?
Can you be more specific?
I'm not sure what it is supposed to look like
I would like to be able to connect the parts into the desired spots, but i don't know how i'm supposed to do that, in any tutorial on rigging a character i see, the parts magically connect together once on the skinning tab
What do you mean? Are they in the wrong spots?
Are you using a single layer, or a multi layered image with the psd importer package?
it's just a png, i don't have photoshop or any way to get a PSD
Then you will need to assemble the character in the scene view after rigging.
like so
Also, the image is distorted when i go to skinning editor
I generally suggest putting more space between the pieces to make it easier and to avoid rendering glitches, but otherwise the same basic thing
Oh alright
My guess is that you didn't properly create sprite geometry for the skinning
That seems likely, yes.
What do you mean by that?
Before bones can deform the sprites, you need to use the editor to make them into meshes to be deformed
I forgot what that editor was called
Sprites have both a rect(the chunk of texture they are 'cut out of') and a mesh(the actual vertices that you use to form that piece of geometry.
Your image looks like you might only have the former.
This thing to first create valid geometry for each limb
Tutorials will surely go over this
This is generally how fully rigged geometry with bones and weights will look
Your character is pretty simple shapes without much deformation so you can get away with a very simple mesh.
The brackeys tutorial I found had the parts come together automatically, so i got stuck there
Well, Brackeys tutorials sucked even when they weren't out of date.
And now they are also out of date.
So, I have all of the geometry, bones, and weights and once i put it into scene view I gave it a sprite skin component and pressed Create Bones and it creates the bones, but the texture is completely gone
I'm just going to ask here since I don't know where: how can I change the ortho size when using a 2D pixel perfect camera set to upscale?
I want to zoom out the game while also keeping the pixelated shadows
if I increase the reference resolution, the shadows and lighting become "smooth" and look out of place
alternatively: is there another way to get this chunky shadow look?
Change pixels per unit or reference resolution
Ortho size is calculated from them to fit a specific number of units into a target reference resolution
the issue if I change the reference resolution the shadows un-chunk-ify
Upscaling will stop working if the reference resolution is not a valid ratio for upscaling
There probably will be a red warning about it too
Anyone have any ideas on how I could fix this?
Power just cut out, I’ll send some pictures in 2.5ish hours
Yay Eskom
It's not a common issue I've heard of
current res (80x45)
also nvm it's now just, not increasing the camera size
its not increasing the camera size/ortho zoom
Pixel perfect camera will not do anything (besides control the ortho size) if your Grid Snapping is set to None
Also it can't work properly on Free Aspect game window unless you're using a Crop Frame setting that can accomodate that
did stretch fill
Your reference resolution should be your display resolution divided by a power of two value
Ideally
You can control zoom by choosing from one of such values and by tweaking Asset Pixels Per Unit
But in fine increments
You're restricted to displaying full pixels after all
divided by 4, its about the right size but the shadows still don't have that "chunk"
if I set the PPU to 8 then my textures are destroyed
unless
I scale everything by 2X
but then I'm back to the old zoom
I've found something which is pretty close to what I want. I'll stick with it for now
if anybody knows how to get a shadow to look more pixelated, that would be quite nice to know
The shadow resolution will be exactly the same as the pixel perfect resolution before upscaling
Couldn't give you exact values though
Gone? As in the bones are visible but the sprites are not? Or the sprit renderer is removed, or what?
Are you getting any error messages in your console?
Or warnings about bone weights?
How's my first Pixel art work character? also what free software do you recommend?
Aseprite isn't free but I definitely recommend it if you want to do more pixel art in the future.
Thx
anyone knows why my textures are blurry even with these settings? it is blurry only in play mode for some reason
compression to none
maybe
idk
didnt work, as soon as i start playmode, it gets very blurry
could it be camera?
do you have pixel perfect camera
yes
You'll want to show what kind of blur it is, and what kind of settings your camera and pixel perfect component have
The blur looks exactly like bilinear filtering, though I don't see an obvious cause for it
Check if it persists with pixel perfect camera component disabled, and check that the texture's filtering is set to point/none in import settings
Usually because you have a pixel art sprite with texture filtering not set to point/none in import settings
Could be other causes too but it depends what kind of blur it is exactly
i found a video i think it will fix it thank anyways
Does anybody know how to make sprites take less disk space in build? The entirety of my Assets folder is 30mb, but the build report says Textures 194.5 mb 99.2% , and final build hovers at around ~78mb, which is just unacceptable for the small game I'm making
This seems... Weird.
Maybe I can force Unity to store original .pngs?
If not, is it possible to create sprite AnimationClip s at runtime, if I'll load stuff from StreamingAssets?
These would not have an effect on disk size
You can limit texture size in their import settings and set their compression level higher, as well as use heavier compression such as crunch compression
(Well, png compression might be smaller but I don't think that's really supported or desirable, as you'd need the build to somehow import all the textures and re-compress them)
I mean, extra mbs have to come from somewhere. It seems like sprites, when imported in Unity, are ~6 times heavier than the source files
Heavier compression would destroy all the details, which is, uhm, unfortunate
The sprites are only grayscale+transparency, so maybe changing format could help, but I'm not exactly sure which of the options would suit this
Unity texture formats are mainly optimized for rendering, not for storage like ordinary image formats
An important thing is to make absolutely sure your textures are Power of Two in their width and length after importing, or Unity's compression won't work much if at all
If you have only two color channels of data, there are some formats that strip down some channels to make them lighter
https://docs.unity3d.com/ScriptReference/TextureFormat.html
https://docs.unity3d.com/Manual/texture-compression-formats.html
Though I'm not really sure how to keep using texture alpha with an RG format, for example
Huh, a WebGL build is only 10mb with no noticeable issues with quality
So I guess everything is alright, problem solved
Regardless, thank you!
Which one of these would be best suited to something along the lines of spawning a bunch of 2D assets along a line like a wall or certain blocks, that i can adjust the curve/shape and that parts can be destroyed in game.
They seem v similar aside from one is designed for 2D but the other seems more detailed.
https://assetstore.unity.com/packages/tools/utilities/easy-spline-path-2d-127710#reviews
https://assetstore.unity.com/packages/tools/level-design/bezier-master-107374#reviews
Have you looked at unity's own spline package they released fairly recently?
Im aware of it but havnt looked into it extensivly
Seemed basic compared to these ones tho
I need to spawn sprites along a line, and the Unity one seemed to be more texture based rather than being able to spawn individual sprites?
There are two packages- splines and spriteshape.
Yep, Unity's spline package can be used for spawning
It isn't perfect but it is very free. 
Il have a fiddle see what i can do, otherewise those asset store ones are only luck £5 each
no such thing as a perfect spline package, most spline assets are overloaded and still don't get you exactly what you need
Yeah, for almost any specialized use you'll probably need to do some customizing.
Is there an easy way to combine a whole bunch of textures into a TextureArray?
Yes, the image sequencer tool from this package
https://github.com/Unity-Technologies/VFXToolbox
O, well... I already got something working. It requires some handling, but it's functional
Does anyone that know Splines well think they can help me out, im essentially trying to make a peggle clone demo, currently im struggling on the level building aspect.
How would i go about spawning in pegs like this, where they clearly follow a Spline, but the pegs seem to bend and contort to the spline to get a seamless finish, instead of just spawning around it in a linear fashion (example 1)
When i instantate my ones they follow the line but clearly are just spawning the prefab along the line best it can (example 2)
However when i apply the extrude function with the mesh renderer it seems to get more of that shape , is there a way to like spawn a prefab into the extrude option/mesh renderer, but they still keep their individual colliders etc? (example 3)
https://docs.unity3d.com/Packages/com.unity.2d.spriteshape@7.0/manual/index.html
If you're using the Sprite Shape package you can find importable examples in the package manager of spline-conforming sprite geometry
The first image on the page demonstrates the effect
So I'm trying to use the asesprite importer and uh
for some reason all of my sprites are like this
How can I avoid these gaps in the collider? I'm using a 2d tilemap collider and a composite 2d collider on the same gameobject which is the tilemap I've painted on. I want it to use the entire tilemap cell as the collider.
Use tilemap Collider Type "Grid" instead of "Sprite"
Or modify the tile physics shapes in sprite editor
@modest cargo Hmm I don't see that option here?
Aha it's on the tiles themselves... Got it working now, cheers 🙂
Hello all, I want to make a dynamic background for my text. I tried doing it through VerticalLayoutGroup and ContentSizeFilter, but it's a bit off because I can't limit the length and width of the text. How can I make length and width limits?
I don’t see why this is happening
It makes no sense
It’s a 16x16 asset
Why is the sprite so awful
If I try to use it with the tile map, everything is misaligned
The importer is brand new so it may have bugs, and there's probably very few around who have already used it
So basically for now just turn the ase files into PNGs for now
Okay, so this is a Ruletile with a prefab attached in the GameObject field. I am getting this super weird behaviour where the prefab is appearing offset from the tile depending on the mouse position. Can anyone even begin to think about why this might be happening? I would expect the prefab would have the exact same position as the tile on the ruletile.
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
How do I add a collider to my tilemap. It's my first time working on them and I have no idea what I am doing. I want the player (which right now is a capsule) to be able to walk on the tile map. I would like it more if you dm me but is it fine if we do it here. I don't really mind.
I'm stuck here with tilemaps people :S
I can't get any material into my tile palette, what every I drop and drag nothing is added.
Please give me a ping if you can help me out.
Did you follow all the steps? Tilemap tutorial linked right above your post
Yeah I'm following https://learn.unity.com/tutorial/introduction-to-tilemaps
Unity’s Tilemap system makes it easy to create and iterate level design cycles within Unity. It allows artists and designers to rapidly prototype when building 2D game worlds. In this tutorial, you'll create a Tilemap and explore the Tilemap system including Tilemap settings, and you'll use the Tile Palette to edit your Tilemap.
But they have tiles in the example already, I don't have that
@modest cargo
I figured out how to add a sprite to the palette, but it's not working either
The tilemap tutorial isn't as clear as the other tutorials I did tbh
Other tutorials go through the setup process in greater detail
You of course need a tilemap sprite sheet first to make a tilemap asset
https://youtu.be/ryISV_nH8qw this is not terrible
Thanks for the link I will be checking it
Urgghh
The download for the example tileset isn't working
It works for me but where the tiles come from doesn't really matter
OpenGameArt has a lot of tilesets
I'd assume you have tileset sprites to use if you've set out to make a tilemap 
can somebody help me every time i export my pixel art to unity it gets blurry and fadded i have tryed many diff pixel art softwares dose anybody know hoow fix this?
Nope don't think so.. the unity tutorial didn't tell anything about getting tileset sprites
I gonna see if this tutorial will help me out(hate video tuts) https://gamedevacademy.org/mastering-unitys-new-tilemap-editor-building-2d-levels/
Set filtering to point/none
Set Compression to none
Make sure your imported image is smaller than Max Size
@modest cargo I can use this tilemaps also in 3d right?
Tilemap tutorials are meant to instruct you how to get unity to use a tileset
Tilesets are art assets so how to draw one is a separate topic entirely
You probably wouldn't expect a mesh importing tutorial to teach you modeling
You can, but it's somewhat trickier because they're meant for 2D
It would be handy if they link the files(bricks) they use in the unity tutorial tho
In Unity in your texture's import settings
ohh alr thx i just started unity yesterday
Perhaps, but tilesets are incredibly simple art assets
Just tiny images in a grid
I recommend looking for them on OpenGameArt first
Even simple things should be mentioned in a beginners tutorial I think 😛
There tutorials and even courses for that stuff, but Unity is only concerned about teaching how to get the assets you already have into their engine
Like I said it's a separate topic, but it's a topic you can pursue all the same ^^
In my opinion once you find an example tileset and get it working, you can draw your own tiles using the file as a base, so the dimensions and import process are exactly the same
sorry if i sound dumb but how do i accses the texture's import settings
Am I seriously this stupid? :S
The use of these folders will become apparent as you move through this tutorial. Next, import the asset pack you downloaded and drag its contents into the “Tile Images” folder.
there's no .unitypackage in the provided download -_-
Which tutorial is this?
Select your imported asset by clicking it in Project window
Import settings will appear in Inspector window
oh tysm
I'm not totally into giving them my email to have them send me a link so I can check if the tiles are there
Either they're there or they're not there, either way you can use any tileset you find online
Yeah I "imported" them by dragging them from pc folder to assets window. But I thought you normally would do import as seen on screenshot
If there's an .unitypackage you drag that into the project window
If not, you drag the folder into the project window
Or use "import package" or "import new asset" in either case respectively
So Import package > Custom package, would be the same as just drag the files into unity?
Yes
That's good to know, I thought there was an extra process behind it
Now I need a smoke XD
@modest cargo "Save “Solids” in the “Tile Palettes” folder. "
How can I save a Tile palette? :S
iirc when creating a new palette and hitting Create you get a dialog of where to save it
Nope :S
Not what happens? Or is the tutorial talking about something else
It just creates a new palette, nothing about saving or selecting
Creates it where? Once the asset exists you can move it anywhere you want in Project window
It creates in the palette window
After I added the images it asked me to save
Which editor version are you working in
2021.3.22
That's the same as mine, so I don't know where this discrepancy seems to stem from
Think it works now, but I still don't understand how this all works
The palette converts .png to .asset ?
Doesn't "convert"
Your tile sprites are in sprites/textures folder or whatever like they always were
When creating a tile palette, you get an asset of that (apparently stored as a prefab) and a tile asset for each tile that simply reference one of the tile sprites each
The tile palette quite literally works as a palette as you can make preset shapes from tiles and paint them many at once
"Tiles" are functionally different from the "tile sprites", as they contain info how the tile will work
It's always useful to be able to modify the sprite textures without having to modify the assets that make use of them, and vice versa for the tiles
recently I imported images edited in GIMP into unity and set them to (Sprite 2D and UI) Texture type so I can use them for my phone app but when I run the Unity remote application my photo quality on my imported images drops drastically as seen on the phone view image. Hierarchy on these objects looks like this empty game object>canvas>panel>panel>6 * (raw image) with textures applied any tips? or fixes?
Has anyone successfully used mecanim retargeting on a 2D humanoid model?
What's a 2D humanoid?
Right, as far as I know retargeting requires an Avatar setup, such as a Humanoid which is what I thought you were referring to
Avatars are fundamentally 3D, though that doesn't really mean a whole lot in Unity context as everything is 3D
The only more or less 2D things are 2D physics and sprite renderers and other related 2D renderers
There's no reason why you couldn't use a 3D armature with 2D sprites
But it might work a bit weirdly in some situations
I will give it a shot, hopefully it looks natural
You can even make 2D games with fully 3D characters and vice versa
The challenges depend on what you precisely want
Think Mario using skeletal rig with the humanoid naming convention. Then I just "copy/paste" Luigi, Bowser, peach etc and can use the same animation assuming the follow the mecanim rules. Is basically what I'm trying to achieve
Also thanks for the response
If the character is using a 3D skinned mesh renderer that should be pretty simple
You don't even need retargeting if they use the same armature
If they're sprite renderers attached to the bones, that may be a bit more involved
But if I throw Toad in there it would look funcy cause he's so short. 😦
Multiple models with multiple sprite renderers using the same animation
So I can just add new characters as I get new ideas without having to reanimate
Retargeting indeed is useful if the proportions change, but motion does not
So, are they sprites or meshes?
Sprites. I would import using a psb file
Hmm I assume it could be hard to make something that looks natural using sprites on a 3D skeleton, especially if mecanim demands you use a Humanoid Avatar
Do post updates
Will do! (rolls sleeves up)
Is the image larger than the maximum size allowed for your build target?
Someone in here posted some examples of that a while ago. Can't remember who
I’m not sure. I was testing on a iPhone 13
I did a proof of concept, though I never finished it it definitely works in that you can retarget, etc.
The distortions are due to the weird rigging of the test sprite. the animation itself is just some random mocap
yes
hey @elfin sandal so i have it working for an animation of 2 different bow shoowint
but it only works for me now when i have 2 seperate library assets. each with the same category name. one for bow 1 and the other for bow 2
can i just use 1 library asset and have 2 categories? so category bow 1 and category bow2?
yeah shouuld work
when i try it that way it reverts to the original category i used when setting up the animation
oh wait so you have 2 bows
yea. each with the same number of frames. its the same animation but with 2 different looking bows
and you keyframe a library asset sprite change
then your only choice is to use 2 assets
yea well right now im just on the editor trying to manually change category
so what is the pontof multiple categories. im not understanding that really
categories are for multiple body parts of 1 character
or say you have different weapons
ok so the way i have it now i have a parent with the children being the different sprites
so the library asset just needs to be on the parent? and not the actual child that has the sprite renderer?
yeah
ok
kind of annoying. because id need to make seperate library assets for each bow animation
so ill probably just put a library asset on each body part instead of making the same library asset a bunch of times with each bow variant
yeah probably better to keep the weapon seperate
ok thanks man appreciate it
np
its been a nightmare trying to figure out how these work. took me forever to realize the category name and labels need to be the same to swap them around
there could be more resources on it but oh well
so ill do one for the weapons which are animate.d than a general asset that has "helmet" category, "unanimated weapon"
makes sense
Does anyone have a good tilemapping tutorial?
Can i change autotile resolution? At first i think its 16x16 but i need 32x32
Hey guys I need help with my title maps. I added a collider to them but when I add a capsule (with physics) it just goes through? Any ideas of what I should do? I already googled this and everyone told me to do the same thing and that is to add a tile map 2d collider which I did.
The capsule has a 2D rigid body (set to the defaults) and the tile map 2D collider is also set to the defaults
In terms of performance, how effective are tilemaps? I want to render a sizeable (30k+) hexgrid and was wondering if tilemaps would be appropriate in this context.
Does anyone know how I can bake image textures to a mask?
I have all these
And I want this to be a single image
Why?
Because my unity version doesnt want to support pbr graphs
So I need to make this into a single image
Is there a way to do that?
Can you... expand on that?
Probably easier to not do it in a shader, bust just to write a script to combine them if that's what you really need.
is there a simpler way to handle different animations when facing left/right?
oops wrong channel
Anyone know how to Give a 3D effect to a tilemap? Or would I need a custom script? Like how Gungeon does it here
i can only draw and animate... not particles
Gungeon is 3d
Also i dont know what u mean by 3d effect?
3D effect as in: the collision boxes of those pillars in the picture are squares, but there is also a rectangular sprite for the wall, and another square/tilemap for the sprite on top, creating a 3D perspective despite being a square from a gameplay perspective
I gotchu, thank you 👌
i have a weird problem with my isometric tilemap and idk how to solve it
is there a way to apply a material to a sprite? I made a simple shader that lerps between 2 texture with a specified mask and would like to use it on my tiles.
I am new to Unity so I maybe there's another way to do this
I am trying to apply this shader to tiles inside my rectangular tilemap
Please don't crosspost
There is not really an answer to that question
Or is there a way to paint GameObject's?
You apply it to the sprite renderer.
but then I can't use it in my tilemap
Hey guys so my player does this whenever you guys up a hill?
https://www.dropbox.com/s/wef6nw66miujral/2023-04-07 12-39-40.mkv?dl=0
So whenever my player goes up he just starts rotating for no reason and sometimes the controls get inverted? Here is the code
`using System.Collections.Generic;
using UnityEngine;
public class Movement : MonoBehaviour
{
// Start is called before the first frame update
public Animator animator;
float horizontalMove = 0f;
public float runSpeed = 4f;
[Header("Components")]
public LayerMask groundLayer;
public Rigidbody2D rb;
[Header("Collision")]
public bool onGround = false;
public float groundLine = 2;
public Vector2 colliderOffset = Vector2.zero;
public Vector2 colliderSize = Vector2.one;
public float colliderRotation = 0f;
void Start()
{
rb = GetComponent<Rigidbody2D>();
// Set collider size and offset
PolygonCollider2D collider = GetComponent<PolygonCollider2D>();
if (collider != null)
{
collider.offset = colliderOffset;
collider.points = new Vector2[]{
new Vector2(-colliderSize.x / 2, -colliderSize.y / 2),
new Vector2(colliderSize.x / 2, -colliderSize.y / 2),
new Vector2(colliderSize.x / 2, colliderSize.y / 2),
new Vector2(-colliderSize.x / 2, colliderSize.y / 2)
};
collider.transform.rotation = Quaternion.Euler(0, 0, colliderRotation);
}
}
`
` void Update()
{
// Ground Check
onGround = Physics2D.Raycast(transform.position, Vector2.down, groundLine, groundLayer);
bool JumpW = Input.GetKey(KeyCode.W);
bool JumpSpace = Input.GetKey(KeyCode.Space);
bool RightD = Input.GetKey(KeyCode.D);
bool LeftA = Input.GetKey(KeyCode.A);
if (RightD)
{
Debug.Log("Right Key (D) Pressed");
rb.AddForce(transform.right * runSpeed, ForceMode2D.Impulse);
}
if (LeftA)
{
Debug.Log("Left key (A) Pressed");
rb.AddForce(-transform.right * runSpeed, ForceMode2D.Impulse);
}
if ((JumpW || JumpSpace) && onGround)
{
Debug.Log("Jump Key Pressed");
rb.AddForce(transform.up * 5, ForceMode2D.Impulse);
}
horizontalMove = Input.GetAxisRaw("Horizontal") * runSpeed;
if (onGround)
{
animator.SetBool("isJumping", false);
}
else
{
animator.SetBool("isJumping", true);
}
animator.SetFloat("Speed", Mathf.Abs(horizontalMove));
}
private void OnDrawGizmos()
{
Gizmos.color = Color.blue;
Gizmos.DrawLine(transform.position, transform.position + Vector3.down * groundLine);
}
}
`
Is there any way I can make a circumference arc act as a hitbox?
You can make a collider in any shape you like.
When you post huge chunks of code please use a pastebin
Sorry will do next time
I am using tilemap to make the map and everything looks fine but when I enter the "game" part, the tiles are separated
any help?
in scene
Check the pins. This is a common problem, it's probably under the pixel perfect links.
I heard it can be fixed by turning off anti aliasing but im not entirely sure
Ye, but i can't make it to change the angle of the hitbox ingame
Hello ! I have a TilePalette in which I'd like to have my global ruleset and other rulesets containing traps, or coins for my game.
For my coin to be visible in the TilePalette, I have to set it a sprite, but it'll then make its animation not visible since it's in the GameObject.
Is there any way to make this sprite hidden when starting the game, or a better way of adding these kind of object in a TilePalette ?
What exactly are you trying to do here?
Put your coins on their own layer and disable the renderer?
What exactly are you trying to do here
THXXX
it worked
lets go
why does it looks like this
You probably need to change pixels per unit.
tile palette grid size maybe?
how do i change that
Hi, I was trying to make a billboard popup for the item the player is looking at and should pick up, but i canmake it so that it renders in front of the object itself.
I thought about moving it a bit forward or use a script to render it on the UI, but I dont think it fits really well. Any advice on wha should I do or how to achieve my first idea?
Nevermind I decided to render it on canvas using Camera.WorldToScreen.Position
Is there ai for pixel art ?
Hey I did google that but did not get appropriate results
What ab using a usual ai image creator naming it pixel art/ pixelated, and then pixelating it by yourself if the pixel wasn't perfect?
You can say that instead of posting a meme
I did both
Also, you could use this, but it is 65$ https://astropulse.gumroad.com/l/RetroDiffusion
Rapid designing with AICreate, change, and refine artwork in minutes.What is Retro Diffusion?This extension for the popular pixel art software Aseprite allows the easy installation and use of Stable Diffusion AI image generator from inside Aseprite. It also adds advanced features like smart color reduction, and text guided palette creation. In c...
i think i have moved my palette and now i have this
how can i fix it without placing tiles again?
I've textured something in Blender, and when I import it into Unity, the texture becomes broken in a handful of places.
Is it possible to paint (on a model) in Unity? If so, how?
In 2D?
In 3D, wasn't sure where to go for texturing
You can do some minor uv edits using probuilder but for actually editing the texture you'll probably need something else.
Hey there.. i’m trying to make a colour by number game and I’m using the bizzy bee template from the unity store. I’m having an issue with the level creator. It is supposed to take a black-and-white image and the colour image exact same dimensions and a few other specifications and then on the output, it’s supposed to create a bytes file, a level text file and an atlas number PNG, which is the output of the original images needed for the game but it’s not creating the atlas PNG I’m not getting any visible errors either. Help please!
🙏
I can share the readme doc if that helps
For obj files procreate is slick and what I’m using fren
it was resolved
Does it take for a long to get up in here? This is my first time in the discord.
man i joined like yesterday

10-4
not too sure if this count as 2d, but i want to know how to make a two colored striped rectangle or anything in this sort of format. like imagine cutting off the green part, i just want that ykwim
hi, me and my team are making a game, and we are using the 2d rigging features. Since the project is very big and heavy, artists are making animations on a separate project, and exporting UnityPackages for us to use. The animations for the bones get passed correctly and everything works, but sprite swaps don't. Basically SpriteResolvers keep losing category and indices. Note that on the original project where artists are working, sprite swaps work correctly. Also, SpriteLibraries are correctly exported. Does anyone have had similar problems and knows how to fix? Thanks in advance to anyone that has any information on this bug
I have had that problem, no idea how to fix it.
Probably something to submit bug reports for, if you haven't yet.
The more peeps complain the more likely a fix is =p
Hello ppl. How can i make the tile sprites adjacent to each other without a space? I tried reducing the pixel per unit of the sprites but this time tiles look very disorganized and one on top of another.
This is how it looks like when i reduce the pixel per unit of the sprites to 410 px:
It's fine on the y axis in 512 px, but leaves spaces on the x axis
I mean, they aren't square
The problem in the second one is that they aren't sorted properly.
they're all in the same layer order
That's a problem isn't it
https://docs.unity3d.com/Manual/2DSorting.html
You'll want to sort them by some method to ensure they have the correct order
These are random generated tiles, they're supposed to be on the same layer order. Are you sure this is the cause of the problem?
It looks like you'd want each row cover the row below, so they shouldn't have the exact same sort priority
Any overlapping sprites shouldn't have the same sort priority unless you don't care which one is drawn on top
Unless you meant to have them next to each other, not "stacked" in perspective
Actually what i want is that the tiles are generated side by side without a space between them. Like this:
These are stacked/overlapping
Looks exactly like you have in your second picture but with correct sort order
You're right but it looks better than my game. Tiles look organized here, not mismatched like mine.
That's the sort order
is it done by code, or in the editor?
Either or both
Check the link I sent
i read the link but still don't understand this; the tiles are generated randomly, e.g the yellow tile is generated on the bottom left at one instance so it looks on the right place, but when it's generated again it'll look on top of another tile, concealing it. What exactly do i need to sort here?
Are the tiles generated in entirely random order? If not, you could likely increase/decrease their Z position or order in layer if you generate them row by row
In this case it might be the simplest to use "custom sort axis" so that the blocks are depth sorted by their Y position, so that bricks below are rendered behind all bricks above them
Yes i think custom axis does the trick. By this way i also learned that this is the way to render isometric objects or give stacking effect, thx very much for that. I have a slight problem tough, how can i adjust this so the top face of the blocks are covered by the block on top?
Reverse the sorting
i have a camera with pixel perfect camera (with pixel snapping) on it following the player. is there a good way to stop the random stutterings happening when the player is moving?
its been a while since i dealt with that but i think you need to update movement on fixedupdate or something
idk it's a nightmare
might have to do with script execution order too
are you using cinemachine
i think cinemachine takes care of it with it's pixel perfect component
i am doing movement on fixedupdate, so i might need to try cinemachine
This happens when the camera position and follow target position have sub-pixel differences so their positions get snapped to pixels at a different frequency
Using any from of camera smoothing usually does that, and also non-smoothed camera movement scripts that move their position in a different update cycle
Cinemachine in my experience is worse at this, or used to be
Parenting the camera to the gameobject is usually the most robust way to stick them together
Which methods are you moving with, and does the player character have a rigidbody?
im moving the character using rigidbody velocity
parenting the camera works, but i want to be able to limit where the camera can move
ok idk if this is a solution that will hold up, but in the script execution order i set the camera follow script before the pixel perfect camera, and that seems to fix it
Scripts relying on a set execution order can be unreliable in some situations but I assume it should be a reasonably good solution
yea, it only works when i move the camera using Update
im just surprised ive found nothing about this online considering its such a basic feature of 2d pixel games. i feel like im missing something super obvious
Three reasons for that I think
First is that there are a bunch of different problems that cause jittering with pixel perfect rendering in different ways, such as conflicting update methods, smoothing and execution order so it's a bit hard to diagnose at a glance or in a single post
Second is that many people just don't care that much if it doesn't look perfect and most aren't even bothering to use pixel perfect components
Third is that Unity's 2D tools are so far from perfect that people who are serious about it prefer other engines
yea, true
Most of the problems stem from Unity being a 3D engine emulating 2D
And the 2D tool team not having a huge amount of resources
im mostly using ppc to get rid of the sprites leaking into other sprites when using spritesheets, and i like the way particle systems look with upscaled render texture. im pretty sure the first issue can be solved some other way.
but yes i might not be using the optimal engine but im a bit stubborn
There are workarounds for both but PPC is probably the solution with least effort overall, all things considered
Unity has a lot of good tools and the huge advantage of being able to combine 3D with 2D freely (except in URP 2D unfortunately)
Yeah, kinda shooting themselves in their main advantage there.
The stated goal is to bring URP 2D up to feature parity with BiRP
If you're interested I think they're still looking for feedback and use case examples on the forums on the topic of combining 2D and 3D
There's already been some improvements in 2023.1., such as more rendering options for sprite graphs, like two-sided and opaque alpha clip
I already told ted what I want.
I think 2drp was a mistake though, even if it gives me pedicures and rum.
quality looks bad. why is it?
Your textures are using bilinear filtering and compression
You'd prefer point filtering and no compression
Thank you sir, fixed
Right, it'd be the most sensible option not to have it separate at all
Did they ever give a reason for doing it?
This isn't a default setting right? This is my second project and in the first one I don't remember changing this option to no filter
No filtering and no compression are only preferable for low resolution pixel art assets really
And not noticeable otherwise
Yeah, you want filtering and compression for nearly everything else.
Anyone know an app that can make a simple animation video from a single picture? I just want a picture to rotate for like 2 mins then save as a video
Or is this even a channel for asking this
It is not
Hey
Is anyone else unable to add the new Aseprite package to their project? https://docs.unity3d.com/Packages/com.unity.2d.aseprite@1.0/manual/index.html
Whenever I try to add it I just get a message saying it doesn't exist.
Make sure you are using Unity 2021.3.15f1 or newer
I'm using 2022.2.15f1, which is newer. That should be supported too, right?
Yap, that should work. What is the message you get when trying to add it in the package manager?
I swear, it didn't work. It just said it didn't exist, but now it works. Maybe the version was taken offline for some time there?
🙃
Haha magic! Im happy it works now at least
Yeah 😅
@crisp flint! Good to see you here 
i don't know if this is the right channel, i hope it is. Do you know how can i make the canvas have the same size of the screen?
That is controlled by the Canvas Scaler component and the anchors of UI components
thanks
Is there any great way of getting rid of these annoying lines?
Using the pixel perfect camera would solve it
Yeah but i dont like the pixelation effect over every rotation
Maybe another workaround could be to decrease the tile sprite PPU just a tiny bit so they're each larger than a grid cell
Btw how to add shaders to sway grass on sprite shape profile
Like if my border is grass
N fill is soils
Example
How do I add a shader to make the grass sway with wind using shader graph
You just change the material in the renderer.
Er, the materials- there are two(edge and fill)
my sprites are coming out in black and white when i instantiate them but the orginal ones have color
anyone know hwy?
Hard to guess without more info. Likely a problem with the shader or with the texture import.
You've not really given any information about how your material, sprite, scene, or anything are set up so I'd only be guessing.
It might be useful to know how you're instantiating them and how the sprite looks in prefab edit mode
Any info you could give can give could be useful since this doesn't look like any kind of common issue
Yeah. It could be that you have the wrong format selected so you're only getting one channel
Or it could be a very broken shader
Hey there. I have an issue with the sprite editor. When I select an area to slice it out, it now does no longer create a new rectangle, but it always selects the last created area. I've restarted Unity and it still does the same. Any ideas on how to fix this?
How do you handle zooming with a pixel perfect camera? It overrides the camera settings, so when I set PPU to 32px which is what I use for my assets the game gets super zoomed out... I would also like to be able to zoom in and out in game.
Hello I don't really know where to ask this but it'm trying to make a cloth attached to my character that has physics. So i've put bones to my cloth with the Skinning Editor, rigidbody 2D and circle collider 2D to them and attached them with spring joints 2D. In fact I followed a tutorial named "Unity 2D Cloth! No Code Needed!" and did everything they did but my bones keep rotating like crazy and this is the crap that comes out of it :
Does anyone have an idea why i cant currently just drag and drop PNGs in my project? I never had an issue before with that with unity and now i tried to make a scene with the map of my building and it just wont let me drag the map on the scene and im confused D:
Hard to just guess at what the tutorial tells you or what you're doing wrong.
Yeah I know but I am open to any way of doing this. I didn't find much on 2d clothes. I just found assets that you need to buy but I'm searching for free ways of doing this.
If you need more information you can ask me too but yeah i've tried numerous ways without any success
What I meant is just saying 'I followed a tutorial' isn't helpful info- you didn't even link it. So I can't even guess at where you might be going wrong.
I'm gonna take a guess and say that your spring constraints might be too loose for the scale of your object, but that is only a stab in the dark.
I didn't want to link the tutorial as for some servers it's forbidden or frowned upon but here it is then
https://youtu.be/obYEeTEvS2M
Also I described what I did and I don't really know what other info I need to give.
Due to popular reddit request, I made a tutorial video on 2D cloth physics. This method requires no code, and looks really great!
Buy me a coffee: https://ko-fi.com/thatoneunitydev
Link to Kenny's platformer pack:https://opengameart.org/content/platformer-art-deluxe
Timestamps
0:00 Introduction
0:19 Project Setup
0:30 Sprites
0:55 Bones
2...
Well, you could show your spring settings, what it looks like in edit mode, etc
Or show it in motion
Your screenshots just show a mess of overlapping stuff, it is hard to tell what is what. For all I can tell your physics is working perfectly and your sprite is fucked up.
Here you go. I also tried enabling collision on the spring joints but it does the same thing. Maybe I have to constrain the bone's rotation
You probably just need to adjust your spring settings.
hey if i want a road in the middle of my sprite shape how can i do that?For example if i want a road to go to house here
Hello
Im starting to learn unity and i need a free application for creating detailed sprites and tiles
Do u have any suggestions
Thank u so much
can you do that using sprite shape?
or do i just make use of tiles here
hmm maybe just draw the road texture with the house that can work
Sprite shape is for bends and curves, tiles are for repeated discrete sprites on a grid
I see neither here, so it'd be just a big singular sprite
could somebody reccomend me an app to create 2d sprites ?
Aseprite scrubs the floor with the competition
Libresprite if you want something free
krita free too can make pixel art
Krita is great for digital painting
My suggestions were assuming you wanted pixel art specifically
How true is this, if I want to achieve pixel-perfect?
It says to determine the size of my main-cam I need to take the height of my screen's dimension /200
So if my resolution is 1024x 768, 3.84 should be the size of my main cam
Would need more context. I'm guessing that that is correct for the particular scenario they are describing, though you can do pixel perfect with other sizes. It depends on how large you want pixels to be on screen.
is there way to reset the tilemap.origin so that the rect (formed by four blue dots) fit the blackrect?
idk why the bottom part of rect is too big
@terse mica Don't cross-post, please
I wasn't sure where to post it, it fits both
Is it possible to organize this list at all?
Hey guys! I'm making a game that's a 2d top-down story teller with interactive characters. (Kinda like corpse party)
Are there any useful assets / engines that would make my life a bit easier with this?
Any suggestions?
hello i got this tileset from itch io
and i sliced it 16 pixel
how to i unselecht everything except the top left i marked with a blue circle
i tried left click dragging but it doesnt work
is there a way to mark everything the tiles on the top left
Why do you want to unselect?
It’s better to slice all of them
Photoshop, aseprite
because for example the Characters arent really properly sliced same as the weapons
What can I use to make this more pixelated, I dont want it to be blurry.
Compression: None
Point (no filter)
In the camera or in the image
I cant find an option for Compression
Inspector
You select 2 of the boxes
Instead of just 1
Click the image from the hierarchy > check inspector
Send me a screenshot of the inspector
Oh wait sorry
I made a mistake
Click the image from the folder
It's best you move this to #💻┃code-beginner and also follow the code posting guidelines
ok thanks do i delete this post?
Yes that'd be nice
why isnt my linerenderer repeating the arrow event though its set on tile
Is your TEXTURE set to tile also?
Is there a way for decals to have a multiply effect, rather than flatly placing the image colors over a surface?
Does anyone have any tips for laying Tilemaps? I am auto generating scenes setting tiles on my Tilemaps. I have multiple layers to create a dense looking forest. As you can see this results in weird overlaps between times in the different layers. Can you think of a way to go about solving this (without manually painting tiles).
See an example of my 2 tilemaps:
can anyone tell me how to decrease the opacity of an 2d object in unity
can anyone tell me how to decrease the opacity of an 2d object in unity
ty
How do I access the materials shader settings? I am stuck on this step
I think you've stretched that element a lot.
Anyway, in SpriteEditor you can use use slice and hit apply. The yellow box in the editor is the actual sprite that will be used in Unity.
https://docs.unity3d.com/Manual/sprite-editor-use.html
I did that it dont work
Also if you've put that sprite on an UI element you might wanna check the inspector and see if you've scaled the object in a weird way.
How do I make my custom cursor larger I tried makin my photoshop file larger but it stayed the same size when I put it into unity
How do I tilemap, I followed a guide but the tilemap has options of isometric, geometric and stuff
just in case someone know, is there a feature to import categorized sprites from folders directly into aseprite app ?
i've been doing it manually
In the inspector, you can change the size
I need to learn how to tilemap still, tutorials seem outdated
I found it out, I am dumb for spending hours trying to figure this out
Is there anyone here who can help me fix this 2d sprite issue?
I've been told it happens when you delete a sprite asset from the tilemap renderer without removing it from the tile palette
I'm not well versed in tilemaps, but yea missing stuff is often shown as pink to make issues easier to spot.
I wonder if there's now a pink spot or an error in the tilemap palette? Maybe putting a new texture on the deleted one's spot would replace the missing ones with it.
Solved! Yeah no idk y I just panicked and didn't cover most of it up. I'm just starting the entire floormap design from scratch. It'll take some time but it's better than keeping that pink stuff there
Do I need a rigidbody 2d to send OnCollisionEnter2D events? or is two colliders (one per object) fine?
I have prepared ui and particle systema assets in unity, how can i scale them to match up with the game's pixel per unit? My game is pixel art, and i would like to make every effect also pixelated.
I dont want to use pixel perfect camera btw
You'd have to use the pixel perfect camera
For it to be able to enforce a pixel grid, you have to make sure you have all the settings correct such as PPU and reference resolution
There are ways to render pixel perfectly without it, but that means you have to handle all the necessary functionality and math that the pixel perfect camera component does for you
And that would be glitchy
but take a look how it makes my character look way worse in a second
@modest cargo
Not sure what you expect me to tell you
It's not the fault of the component that you're not using it correctly
Also, it kind of destroys my cinemachine confiner
it snaps to the white outline but only green one is displayed
I hate when my game doesnt feel right and things like this happen
you'll hate it more when your one month in and with no progress on the game
Are your sprites using 15 PPU and is your scene designed for 15 PPU?
its designed for 16, but green outline matches white only when its set to 15
If you set Grid Snapping to Upscale Render Texture it pixelates everything to your reference resolution and more clearly visualizes the pixel grid you're trying to enforce
Unity's default sprites are 256 PPU, this is unlikely to match your intended PPU
You cannot use this system unless you understand it
https://blog.unity.com/games/2d-pixel-perfect-how-to-set-up-your-unity-project-for-retro-8-bits-games
https://docs.unity3d.com/Packages/com.unity.2d.pixel-perfect@5.0/manual/index.html
Study its theory first
Or do as Hamboy says and focus on making the game itself
hey so how come the image quality of my sprites got worse after cutting them up in the sprite editor
this is it now
A sprite this large will likely hit the default max sprite size and be downsampled
so whats the recommended size
I don't know if there is a "recommended" size but if you arrange your images into a grid, they will be a fraction of the height
so if i slice them in a grid the quality will be better?
If it's not longer limited by the max size defined in import settings, yes
yeah idk why but the pictures get blurry immediately after putting them in either unity or sprite editor
do i have to use vectorgraphics?
but that wont work for my use case
I told you why
so what i should make them bigger or smaller?
its 499 by 10000
If the problem is that it's hitting the max size limit, what do you suppose?
well when you put it like that
ill try it out but downsizing it anywhere is gonna hurt the quality
even though you made fun of me, thank you
I also suggested you arrange them in a grid, might not need to resize at all then
The problem is that their current arrangement is horribly inefficient
hmmm
ill look into that ty
its my first time using 2d tools, so kinda just testing the waters right now
This is not exactly a 2D tool related problem, but a generic texture import problem
The max size setting will downsample any texture just the same
You can also change it, but generally you'd want to import textures in sane dimensions
very true i was basing the dimensions in relation to the samples i used
should have thought that through a bit more
Point
In the inspector
Filter : point (no filter)
Compression: none
These are the settings for importing pixel art without issues, but won't help with size limit downsampling
It doesn't look like it's meant to be pixel art so I'd enable bilinear filtering in this case
Hello, I have a 2d pixel art character that I made for unity, but its animations are not very good, can anyone help me write to dm?
Is clip studio paint fine for making sprites?
Yes
Honestly there's little reason not to go with trilinear thes3 days unless you are on mobile
The performance difference is negligible in most cases
is there a 2d alternative to probuilder?
What is the alternative to a 3D mesh in 2D? 🤔
i ment like a level builder for 2d
tiles
Unity’s Tilemap system makes it easy to create and iterate level design cycles within Unity. It allows artists and designers to rapidly prototype when building 2D game worlds. In this tutorial, you'll create a Tilemap and explore the Tilemap system including Tilemap settings, and you'll use the Tile Palette to edit your Tilemap.
tysm
Does anyone know why my Sprites are stretched when applied to an Angle Range on a Closed Sprite Shape?
The Grass Sprite pictured works fine when used in an Open Sprite Shape but when I apply it to an Angle Range in a Sprite Shape Profile to be applied to a Closed Sprite Shape, it comes out stretched in the middle and squashed on the edges.
How do I avoid this?
how i can send this in the back if they are in a different sorting layers?
How could i spawn blood splatter under this particle effect
where is the ik package?
did unity make it so you cant use ik in unity 2019?
i dont see the ik package in the package manager, and when i typed in IK in unity's github repository it didn't pop up
anyway i can find it somewhere?
i don't want to use 2020 and up versions because they're not stable on my old laptop
nevermind, you have to enable preview packages in package manager
😅
I'm using the Tilemap/Tile Palette and I can't add more than a single Cell per palette with the GameObject brush. The "Orientation" property is overlapping the +/- button, and when attempting to change cell size, it just clears the Gameobject. I've seen other people's UI's and they aren't like this so any help would be appreciated
Nm, I figured it out! =)
U change the sorting layer. For example, try -10
in the Unity Skinning editor, some of the changes I've made to the vertex weights using the Weight brush gets reverted once I click apply. It has cost me a lot of time at this point. Any ideas of what's going on here?
Is there a tool or simple component that combines textures but keeps the individual sprite dimensions in the final texture?
My game has a set of walking sprites for dozens of enemies but uses a separate texture for each.
The texture is actually a Sprite2D, sprite mode is Multiple.
...so the reason for doing this was to reduce draw batches and I went with a sprite atlas instead.
Hello, I'm wondering if there any best practices regarding picking your Camera base orthographics size in a 2D project ?
I have picked 15 randomly since it was making it easier to work with particle effects size values, but I don't know if I should take other factors into consideration (target resolution, etc..)
I have not started mass producing sprites and think I need to figure that out before starting
So im trying to make a tilemap to visualize something i made but when i click create new palette i get this error : ArgumentException: Unable to set invalid palette and when i click on the no valid palette the only thing there is the create new palette
You need to create a grid and tilemap in the hierarchy
Click the DungeonBackground in the hierarchy
Then create a new tile palette
If it is the same as I've experienced, that's a long frustrating bug.
I'm making a 2D top down game, and I've started using Tilemap in Unity. I want to use rule tiles for automation. All the tutorials teach about using tilemaps for side platformers, but top down is different because certain tiles should end up on different tilemaps (fe. walls should be separate from floor). Can I create a rule tile that will separate walls from floors automatically? or what's the best approach for using rule tiles in top down games?
You can just create a separate tile map for floors and walls.
But you will soon realize that rule tiles don't work too well with games that have a lot of details in the scenery, like adding paths or different patches of grass.
Yeah I know, but I need a rule tile that will have a floor tile in the middle (in the Floor tilemap) and wall tiles on the edges and corners (in the Wall tilemap because collision). In other words, two separate tilemaps inside a single rule tile.
You can make more than one rule tile, just make one for floor and one for walls.
do you recommend placing tiles/assets by hand?
so in the one for walls, there will be nothing in the middle? empty tile?
It depends, if you can automate it then automation should always be priority. Like you could make your own auto-tiling system, expand from the existing one and etc.
Well, walls will only interact with other walls in this context. So you paint the floor with the floor rule tile and then you paint the walls with the wall rule tile.
you mean custom rules maps scripts something something? I've heard that is a thing, didn't look into it yet
alright, makes sense
thanks!
What do you mean by 'connect' it?
Are you talking sprite secondary textures, or what?
Is specular type material stuff available for unity 2d?
probably yes
I'm on mobile so can't link it but just google sprite secondary textures.
Be more specific?
Ah, I can't find any ability to apply specular maps or indeed change the shinyness of any object in 2d unity
It doesn't seem to be part of the kit
I'm guessing it's because 2d lights in unity are "fake" lights
Like if I want a sword to be shiny like metal in 2d unity that doesn't seem to be possible
Well, sprites are 3d objects so you can apply a different shader to them that reacts to 3d lights- though sprite meshes lack proper tangents.
Doesn't that imply they wouldn't really work with 3D normal mapped shaders? I tried some and couldn't spot issues
They work from certain angles but not others. They don't have a proper 'front' and 'back' like a mesh renderer would.
So if you look at them from behind(for instance) or flip them, you get normals flipping around.
hey, im having a issue with opening the sprite editor not opening, I've tried googling and following steps but I can't seem to solve it (or maybe I'm just missing something easy :D)
- i have reinstalled the 2D packages, updated to latest version, restarting etc, new project still same issue, i have reset to default layout if it should spawn outside of screen
- i receive zero errors when pressing, nothing just shows up
My guess is that it could be opening outside of any active monitor
After clicking the button you should be able to press windows key + arrow keys to snap it across monitors, to rule out that potential cause
That doesn't work :/ I tried resetting all the layouts to default aswell, but no luck. Maybe I should try reinstalling unity and see if solves it? Do I need to reinstall all the other installed packages, assets etc I have downloaded from the package manager and unity store or do they come back with the reinstall?
I've only managed to find one reddit post with the same issue, but no solutions found hehe
It looks like the 2d GlobalLight has no direction. Is there an equivalent to directional light available for 2d?
I just reinstalled all of Unity and it solved it, gave up on trying to solve bug 😄
Apparently not
I think that could be a feature worth suggesting in the forums or the roadmap
If we could just set the angle in the global light that would be great y'know
Also being able to use the normal map with it
Indeed
How messy is mixing tilemaps and normal gameobjects together for level design?
Like 60% of the levels is doable with tilemaps, and I'm fine with gridded collision, but also want non-tiled stuff
Do I even have a choice here? Are there any examples of games made in 2d (side view) that used / did not use tilemaps?
What do you mean by "normal" gameobjects specifically?
Like ah, if Mario suddenly jumps from the tilemapped bricks onto like a special mushroom that was not tiled
Basically just a normal colliding game object
There aren't really that kind of limits
Sure, so that part works fine, yeah?
Hollow Knight for one uses a lot of non-grid non-repeating sprites for its environments
Tilemaps allow you to define non-tile prefabs to be instantiated on specific tiles
All 2D colliders can work together, as can all 2D renderers
Non-tile prefabs as in normal prefabs?
What's not a "normal" prefab in this case?
Tilemap is just a workflow for making it easier and more performant to place sprites and generate colliders for them
Right
I feel like I may have misjudged tilemaps
I see how people use them and it's very Mario Maker
But I was hoping for more hollow knight
like, dynamically placing larger objects
Tilemaps are very effective for blocky, square level creation, but it's not the only thing they're capable of
Right, and I bet they're useful if you want to do pathfinding stuff
Do note though that tilemap renderers and sprite renderers or other types of 2D renderers are technically different things
2D renderer components refer sprite assets to create procedural geometry for rendering those sprites
The editor gives you tools for dynamically placing larger objects in the form of "dragging and dropping prefabs into the scene"
If you want to create them procedurally at runtime you can instantiate them with code
I'm not sure what that entails
Yeah, this is fine. I'm just wondering if like, the tilemap system would conflict with this
Not inherently, no
Like, the scene won't explode if you have a tilemap and sprite renderers on top of it
I can't think of any exact examples where they would conflict either
Right, in that case it seems safe to use
The tilemap renderer also allows for normal maps etc? Shaders?
Sprite shaders and secondary textures should work, but I don't have first hand experience with them
They look fantastic, very easy to have fun with if you haven't tried
I'll give tilemaps a shot then
I just want to try to avoid the mario maker look
Tilemaps make it very convenient to build in a simple grid, and quare one-unit tiles are the easiest to set up tile rules for
But really it's up to your artistic and technical ability to design past those limits
Tilemaps also okay for stuff like raycasting?
2d raycasting that is
If you mean raycasting against 2D colliders then yes, assuming they have a 2D collider such as tilemap collider
need help understanding this bit from the unity blog
does it mean the pixels are being stretched?
Context:
The PPU for the 218 x 175 px rock was left at 100
and the orthogonal cam size is 5 (which makes the vertical cam height = 10)
I know the basic formula to find the PPU for a sprite would
be the (vertical dimension of the screen in pixels ÷ camera height)
So ideally, the PPU for the rock would be 108 units (assuming it's 1920 x 1080)
Is it possible to shade an entire sprite sheet a certain color with just the editor?
Like make a duplicate like this and just shade it like it's possible to do with other sprites?
I need some help determining which tile the mouse is over when hovering. This is the code I have so far that seems to be the general goto. But I am having issues with the worldPos result being wonky and not mapping to a proper cell.
var mousePos = UnityEngine.Input.mousePosition;
mousePos.z = 1f;
var worldPos = Camera.main.ScreenToWorldPoint(mousePos);
var mapCell = _terrainTileMap.WorldToCell(worldPos);
var tile = _terrainTileMap.GetTile(mapCell);
if (tile == null) return;
The Grid position is 0,0,0 along with the tilemap within it being 0,0,0. The Camera will zoom in and out as part of the controller. I have been stumped on this for hours and every search result comes up with this same solution. But no matter what, the mapCell is always the same. Im not sure what I could be missing here.
You could use a raycast from the mouse and hitting all the layers of tilemaps , otherwise I have only used something similar to what you were doing:
var worldPoint = Camera.main.ScreenToWorldPoint(Input.mousePosition); var tilemapPos = tileMap.WorldToCell(worldPoint); var tile = tileMap.GetTile(tilemapPos);
Does anyone know an easy way to get a reference to the game object spawned by SetTile with rule tiles?
I have a rule tule with a game object attached and I want to get a reference to the object so I can do something with it, but I am not sure how
The PSB importer is creating frames of different size from my layers. I want it to have every sprite be exactly the same size. Is that possible?
The sprites are positioned correctly in the PSB, but as soon as I bring them into Unity they are all in random positions depending on the pose. For example extending an arm forward moves the body left
What are you trying to do? I believe it shouldn't matter how the individual parts are laid out on the sprite sheet on import with PSB
It's a walk cycle
But as the poses for "legs extended" are wider than the pose for "legs underneath", the character moves back and forth
Moves how? Is it a skinned sprite* renderer?
How the sliced or rigged sprites move shouldn't depend on how the sprite sheet is laid out
Ah, I'm just using a sprite resolver to swap out the image basically
It makes sense that the position of the art in the PSB doesn't matter when you say it like that.
So how would you ensure that the position of a character is constant when swapping out the texture for the sprite?
Wanting to do that may be impossible with the PSB importer?
With the Sprite Resolver as I understand you would swap out sprites contained in a Sprite Library asset, which can take any sprite regardless of what sprite sheet they come from
Yeah but their position is off related to each other. Basically as the sprite sizes are different I lose control over the location of the object itself
The "location" would be the pivot point set for each sprite in the sprite editor
Basically if you imagine one sprite where a man is standing, and in the next his hand is reaching forward
he goes from being in the center to being on the left
Ah that makes sense
So I just place it myself then yeah?
If you have the option to do it manually then that sounds like a solution
Do these threads appear to be describing your specific issue?
https://forum.unity.com/threads/imported-psb-prefab-origin.1171891/
https://forum.unity.com/threads/sprite-swap-resolver-and-sprite-default-pivots-issue.1016065/
They do
I guess manually setting the point is fine too
By the way, is setting every keyframe to "Both Tangents - Constant" really the only way to fbf animate with the sprite resolver?
Is there no other way to prevent it from interpolating?
Anyway, thanks a lot for the help Spazi.
I am getting acquainted with Tilemap, and presently playing with the "GameObject Brush" from the Unity "2D Tilemap Extras" package.
It has a list of "Cells" describing the game objects which should be instantiated together, but I seem to be unable to add elements to the list - clicking "+" or changing the list size only results in the first (and only) element being reset. I'm struggling to find any similar accounts on the web - any thoughts?
Its a preview package meaning that bugs are expected
If you want to fix it youll have to learn efitor scripting
I see - thank you!
Hmm tangents or interpolation shouldn't affect animated properties that cannot be interpolated, like bools or references
But maybe there's some oversight in the system or something I don't know
Does anyone know an easy way to get a reference to the game object spawned by SetTile with rule tiles?
I have a rule tule with a game object attached and I want to get a reference to the object so I can do something with it, but I am not sure how
I wrote my own =p
What about dragging a prefab into the list? (Specifically, into the dropdown, so it is added to the list instead of replacing the first item) Also, do you have the same problem with other arrays in other scripts?
Ok but why does unity do this to my sprite? when I rotate it upwards or downwards from the pivot, it becomes l o n g
But then if I rotate it left or right, it becomes w i d e
Anybody know why?
Hi, in my WebGL Unity project I am using .svg graphics. That is why I had to add Vector Graphics to my project.
Problem is that when I am building project manually graphics looks good and everything is fine. But when it is built by Gitlab pipline and pushed to my server, .svg graphics is deleted and replaced by white squares.
I already add Vector Graphics to .gitlab-ci.yml, but nothing changed.
Any idea how to fix it? Or where I can find solution on my problem please?
Hierarchically inherited transform scale
No dice - it seems the list does not accept prefabs as elements... I would guess due to list elements having a bunch of other fields in addition to the GameObject?
Also, do you have the same problem with other arrays in other scripts?
Not that I've noticed - I just threw apublic List<GameObject>andpublic GameObject[]in a script to double check and both function as expected.
I appreciate the thoughts in any scenario :)
As Spazi said, it is because the parent is scaled non uniformly. If you wanted to counter this, you can apply an inverse transform to the child(or an intermediate empty object)
Usually the best workflow is to keep all gameobjects with children as 1,1,1 scale, and if you need a scaled gameobject, such as a stretched sprite or a mesh, it's best to have it as a child gameobject
Hi everyone, I have an issue that I think is related to 2d tools. I'm reposting here because It might be more related to 2d
I have a back ground image and an additional layer to that image that are basically the "interactable objects" in the image. I'm trying to layer the top layer on top of the original image ... but I also need to separate each object which I did with the sprite editor.
Is there anyway to do what I'm trying to do by layering it first and then separating each interactable as their own object or is this just a matter of having to do this all manually?
I think the PSB importer can store the positions of sprites on a different layer of the image relative to each other
Tysm this worked
Is psb importer a plug in?
Im having trouble locating it
Oohh! Thanks! I'll test it out as soon as I can!