#🖼️┃2d-tools
1 messages · Page 3 of 1
Are you talking about the canvas?
@civic knot any suggestions?
If it's really the canvas, then you can't align it. It depends on your screen size.
Hi,
I have a very newbie question but I need help with it...
I know that Canvas should only have our buttons and other UI elements
but what about the game itself... like i am trying to make a board game... it has a lot of images of course... do I make them included in the canvas elements or just make the camera render those objects ?? can someone help me please
or post a video that will help
Ui for things that dont move
but what about making sure things wont get out of the screen
Things don't just magically move. If you don't put anything outside of the screen, it won't go outside of the screen
doesn't matter if that's in the canvas or the regular space
sorry was away .. reading
hmmmmm true
ok another question related to that... how do i make sure the pictures will be there if player changes the resolution of the game
Also I figured out the issue
It was the camera lol
Awesome, thanks!
how do i make sprites cast shadows?
use the 2d urp renderer
but the shadows look horrible
so you'd have to find a seperate tool if you want them to look good
where can i find these tools?
Git hub asstet store google
Hi, i have a player with a script component that contains a scriptable object with serialize fields sprite varibles. How can i run my animations with the sprites that are in the scriptable object?
Wont work with the animation componemt
You would have to make a monobehaviour that switches them for you
You could hook up the animation component to that monobehavior tho by animating a float value
Aimator can just pass a float to the script and it can round it down and assign thev espective sprite based on the float
So theres no way to get the sprites that i mentioned here?
Correct, you cant
Like making my own animator??
Not necessarily an animator
Just a script with a method that changes its sprite based on a value
So if the animator changes the value to 1 use the first sprite
Changes to 2 use the second sprite
What code gets the animator value and the animation that is playing?
The animator changes a public variable on the oject your animating
i need a bit of help
does anyone know what happened here?
i had a decent looking UI in my canvas and everything was fine until i tried popping out my game view
and it got screwed like that
nvm i got it working
My guess is that you had stuff anchored to the corner of the screen instead of the center
i was just wondering if there was a way to like link the position of a sprite to the position of a point on another sprite, that can be defined in the editor or something
Having an issue with 2D colliders
I’m making and my character goes through the terrain
I have under the terrain:
BoxCollider 2D
TilemapCollider2D
CompositeCollider2D
and RigidBody2D
is there a way to apply shader graph to UI image?? ... not a quad a UI image... what type of shader should I use
Can you be more specific?
When I change the pivot point on a spritesheet, it doesnt change it and just defaults back to the center in scene and game views. Does anyone know why?
can someone help me with this please
Do you have the pivot mode set to center?
Where can you see that? Probably
here is a video of an example of what I'm looking for. it's on a different engine but it should get the idea
You can just add an empty object as a child and animate its position each frame. You'll want to set the keyframes to have no interpolation so they don't wobble between the frames of the sprite.
hey there! i wanted to ask a question about an artistic sort of mechanic that i want to implement to my game!
i wanted to ask if anyone knew any ressources about how to do a binding of issac style "sprite swap" for a character in game? basically like issac in binding of issac changing his sprite as he collects different items!
i wanted to implement this mechanic with my chracters (basically when picking up objects their sprite gets changed "like getting a third eye, changing their hat...etc") but i couldn't find any ressources or advice on how to do this with 2d pixel art sprites!
if this is not the appropriate server to post art questions, i apologies in advance!
is it possible to have the animation differ depending on what animation the player is playing?
Can you rephrase the uestion?
so lets say like the player is doing a different animation, which requires different positions. is there a way for me to script the child to change its positional animation accordingly?
You'd animate the position for each animation clip
Yes. An animation can effect itself and children.
ah yeah thats done it
awesome thank you
where do i change the interpolation so its instant?
nevere mind i got it
for the tilemaps, I when inputting a sprite to create a palette the position of the tiles does not match at all between the two, is there a way to make sure those would match?
How to fix my textures coverting up my UI
Like for textures I can order with the help of SpriteRenderer, but what for UI?
UI sorting is based on hierarchy
When I try to put a material onto a square, it just comes up completely grey and I've tried changing the shader to almost all options and none of them change it
So when you say 'a square,' you mean a sprite? A quad? A cube?
A sprite
I've tried changing the ambient lighting, and plenty of other answers I found on google, but nothing helps
What exactly do you want to happen?
Are you using a correct material for your rendering path?
For the material to go onto the sprite
Well, if it is changing the appearance of your sprite, that sounds like the material is being applied.
Show your inspector?
It has been applied it is in the inspector, it just doesn't show the sprite of the material
here it is
It looks like the material is on there.
You'll probably need to add a texture for it to look interesting
The material has a texture though?
And when I try to replace the white square, it doesnt change
Your material has a _MainTex property which is being overwritten by the sprite renderer.
I click on the texture I want and the menu just closes
Because that's how sprites work
So should I delete the sprite renderer?
You add the texture to the sprite renderer or you use a shader that doesn't get its texture from the sprite renderer
Such as?
Such as you make a shader that doesn't use _MainTex as the texture input, because that texture input will be overwritten.
I believe all the built in shaders use that input, specifically for that purpose.
Most shaders assume that if you are using a sprite renderer that you want to use the sprite the renderer supplies.
You could also just use a quad instead of a sprite.
What's that?
So I found it, but now I have another problem where the texture is just stretching instead of tiling, and when I change the tiling, the texture just glitched out and did what I'm showing on the image below (Also thanks for the previous help Pinballkitty :))
Nvm I figured it out
@bright scaffold I believe all your problems stem from using non-sprite materials/shaders on a sprite renderer
Yeah probably as it all worked when I put it on a quad with a mesh renderer
Okay, I’ll shorten it. How do I make randomised tiles but with GameObjects instead?
you'll have to make a script that inherits from gridbrush and then override the paint function
Hierachy? But my UI is already on top in hierachy than all the sprites that I've kept
But they still like cover up by UI
It's attached to the camera btw
if you want UI behind then you have to change the sorting layer of the canvas
or sorting order if they're on the same layer
and it will apply to all children of canvas
ohh ohh ok. Actually I want the UI in front, like the main menu button and all attached with the camera
just use the UI sorting layer and it should be on top
Ohh ohh ok, thanks
Ty very much
can we activate perspective on a 2d project camera ??
Yes. Just switch the camera type to perspective.
This question is so basic that I couldn't find an answer for it by googling, any help would be appreciated. When I make an object a child of another, it doesn't move with the parent object, which is weird because it worked with the camera - I'm probably missing something super obvious here though
hmm can you send a screenshot?
I want the playercenter object to move with the player object, but it isn't for some reason
i assume you selected the player object when moving them?
yep
wait a sec
it works in scene view but not when I start the game and start moving around
why is my caracter position not aligned with the sprite
and how do i fix it
nr8 is the sprite(s) and u can see its position in the bottom left corner
Is your movement script moving the right object?
It’s moving the player game object, idk if that is the right object
Odd
The origin of your sprite is probably set somewhere weird
You can change it in the sprite editor on the import settings of the image
For most purposes the most convenient place to set your origin is just the center point
where do i make 2d art
Drag images into your project’s assets
You can assign those images to sprite renderers
Unity itself doesn’t have tools for making sprites in the same way that something like game maker does
You’ll need external image editing software
I suggest paint.net for static assets and aseprite for animated sprites
Hey, would anyone know why my isometric tiles are looking like this on the tilepallet?
I booted up unity today and my background is looking like this. I tried deleting it but nothing happens what do I do
Can you be... more specific?
What should it look like?
maybe the sky, like the right part of the sky is there but if u look closely when its going to the right it like cuts off and goes a bit under. This might be it but its just a guess
@maiden coral Don't crosspost.
oh srry
does anyone know a good alternative to the shadow casting provided by urp? it looks really jjagged and ugly
For some reason when I booted up unity the sky is now cutting off apart of the background for the building
Check the sprite Z positions
I found out the problem
After it crashed it fucked up the sorting layers
So I fixed it by creating another
I am new to shaders and I made a simple one that animates this square sprite. I am wondering if there is a way to add a collider that continuously updates to match the appearance of the square as it shifts?
There is not a simple way to couple physics with the visuals. Generally, shader based vertex animation is visual only since it is on the gpu.
For such a relatively simple motion you can reproduce it in a script to change the collider.
Indeed, the CPU does not know what data the GPU is pushing out and you really don't want to make the CPU dependent on that
Usually you'd run the functions in parallel (e.g. GPU calculates a wave function for each pixel of a rendered ocean, while the CPU calculates it for points where buoyant objects are on the surface)
..Or do the whole calculation on CPU if there's relatively few points to move (such as with low poly meshes or sprites)
good to know thanks
I'm making a 2d pixel style rpg, and I want to know if tilemaps are essential for backgrounds/ maps. I'd like to include a bit more detail to my world and i dont think it would be very efficient using tilemaps. any advice?
Tilemaps are a tool to specifically make it more convenient to build (and more efficient to render) environments on grid with a lot of repeating sprites (regardless of resolution)
If you don't need them for their advantages you have no obligation to use them
If for example I want to make a town area, should i first make the pixel art for it, and then ill be able to add collisions in spots that i need? e.g. a house or a wall?
And if yes would you happen to know what I can search up to learn more about it?
I've tried searching up things like "alternatives to tilemaps 2d unity" but I didn't get any results
I don't fully understand what you're asking
There's no "alternatives" because tilemaps are a generic method to solve a specific problem
sorry, still new to unity so not sure how to explain well - what I mean is, is there another way to create a background without having to use tilemaps?
You can use ordinary sprites just as well
Alright I think I'm being dumb actually, I think I understand now. Appreciate the help :))
If you want to make the kind of levels that tilemap editor is suited for, it'll be much easier to do it with the editor than without
It's not deeper than that
Tilemaps are just sprites sheets at the end of the day
Both types support collision information per sprite as well
Ah okay perfect, cheers!!
hmm the AnimatedTile in the 2D extras doesnt actually derive from Tile?
it derives from TileBase but using that i dont see a way to use it as a tile
oh nevermind i may be stupid
hey, i'm trying to open the Sprite Editor, but nothing happens when i click on it. It just doesn't open. What can I do
Too many possibilities. When you say nothing, you mean no error messages too?
No script errors in the console?
You have the package installed?
Have you tried resetting your interface? The window might be opening up off screen.
Did you make sure it isn't docked behind something else in a pane of the interface?
how can i fix collisions going through walls? im using continuois
bullets specifically
How are you moving your bullets?
yeah, but i restarted my pc and it's working fine now, so i have no idea what was up with that.
sorry i've moved back to the beginner channel. i changed initially because i thought the thread was over, but it was since brought back up in the beginner thing
Then you remove it from the old place so you're not wasting people's time asking follow up questions which have already been asked elsewhere.
Stay in one channel.
alright my bad
- Bounds of my tilemap are awkwardly off the actual size. My script relies on them, how can resize it to the actual values?
- Nvm i was googling it wrong
- Instead, i have these perfectly one pixel wide no matter how much do i zoom in artifacts in my tilemap. They are not present in edit mode, only during play. What could be the reason?
is there a way to make grid components visible in editor?
does anybody have a visual reference for what the parameters of overlapcapsule2d
Hihi, wanted to know if there was a way to make sure the tiles in a tilemap scale to the grid
I can set the grid cell size and then scale the actual grid gameobject but I feel it might be problematic since I wanna have placeable and breakable tiles (like terraria)
if I change the cell size the sprites and colliders don't scale to fit the new size, is that a thing built in or would I have to make a custom tile?
Sprite size is determined by the 'pixels per unit' setting in the image importer
So if you change the grid cell size, change the tile sprite PPU to match
if I increase the PPU the sprites get smaller but if I decrease the PPU they lose detail
the original was 100 PPU with a .16 X .16
ok that worked, set the PPU to 16 since they're 16-bit sprites and grid back to 1 x 1
I have no idea why I thought a .16 grid with 100 ppu was a good idea, was following a tutorial but looking back that's a really weird way to do things
tyty @elfin sandal and @solemn latch
final quick question, if I use a tilemap collider with a composite, am I still able to get the tile by location via a raycast/circlecast hitting a tile or would I have to go by world XY -> TileMap XY or something like that
Theres a function that gets tile from world pos
Read the api
Doesn't matter if u use a composit collider
oh? sweet
hey folks. I'm having a killer problem that I just don't seem to know enough to be able to solve on my own.
I'm working on a 2d sidescrolling platformer. The main player consists of multiple sprites rigged together with bones and animated. I was thinking I'd really like to be able to draw an outline behind the player.
I started with making a 2d outline shader that draws a character pushed slightly in 8 different directions and got that working well enough, but
since it's a rigged sprite, the mesh geometry has to stay pretty tight around the individual sprites. That looks pretty bad combined with the natural limitations of shaders (in that they can't exceed the rect you're putting into them). Not only that, but I don't want the shader drawing inbetween certain sprites, like the hand and the forearm.
To combat this, I wrote a simple script that automatically groups the sprites I want outlined together and then creates clone sprites underneath them, which get the shader treatment to become the outline.
Unfortunately, parenting my outline sprites to the sprites they're copying doesn't work, because their transforms don't actually relate at all to their worldspace. I tried instead parenting the outline sprites to the bone transforms of the sprites they're copying, but those bones don't actually contain the proper rotation or local positioning information of how the sprites they're controlling relate to them. I don't know how to access that information, and every attempt to magic number solve the problem was even more bafflingly off than the last. Does anyone have some advice or experience with something like this? It seems like a simple problem, but it's been pretty challenging for me.
Probably better to use a blit to make an oitline
Or using a render texture
With a shader
How does one acess the texture importer?
As Hamboy said, just find the texture in the project pane and click on it to access its import inspector.
There are two relatively workable solutions. You can use a rendertexture of the entire character, or you can just make outline sprites in the rig and put them behind the others.
Like so. https://imgur.com/1dpslzb
how do i make this tilemap solid (the player can stand on it without falling)
Add a tilemap collider
Is there a way to change (or disable) the grid size of a tilemap without messing up the tiles?
I want to put more specific details into the tilemap but want to place them outside of the 32x32 grid so they look nice and fit with the environment better. Can I do that with a tilemap or do I just need to do it as GameObjects outside of the tilemap?
either that or use another tilemap
Thanks, figured as much but wanted to make sure I wasn't just missing something 🙂
probably preferable to have freely placed assets like that seperate from the tilemap
I like the idea of using a RenderTexture. Thanks for the help!
Could you give me an example of how you'd use a RenderTexture for this?
you set up a second camera that only sees the character layer, and outputs what it sees to a render texture
you feed the render texture to a sprite renderer(or a renderer of your choice) and apply an outline material
huzzaahhhhhh!
thank you all so much
Now I just need to figure out how to set the location for the sprite renderer such that it matches up with the object programmatically
oh, nevermind, I just need to parent them to the camera
glad u got it working 👍
I added a cinemachine 2D camera …but it zooms in when I press play ….. how do it get to show a bigger view when I hit play
Thanks
Is there a list of indie developers …. Who do commissions work ?
You can use websites like Upwork, Toptal and such to post for jobs. There are other discords like Work With Indies or GDN that have job posting channels as well.
@abstract olive thanks
Ah well the issue im having is with 2d sprites and images so I'm not using any textures right?
...Wrong?
It is still a texture, even if you don't set it as a Texture2d type.
can someone help me with 2d jump animation
Depends on what you need help with
Hello all, new to unity and the discord, needing some help with a problem. Doing a test project where I create a character using gameobjects + sprite renderers for all the different body parts, in preparation for character customization so that all styles can share a set of animations. I was planning on adding bones to the newly created character gameobject in order to later animate them, but I'm unable to do so. Is this something that is even possible - can I add bones to a gameobject? Or am I limited to modifying position/scale/rotation on the gameobjects themselves in the animations?
Bones are possible in unity, iirc you use the sprite skin script
So I'm making an attack animation and I'm wondering how I should set up the smear frame/the slash effect. So should I make the slash effect a child of the player/parent or make it its own independant game object. Or should I make it a particle?
most times it's part of the sprite
yes but the effect can't fit in with the 16x16 character sprite
so should I make it a child of the player gameobject?
depends on a lot of things
it would be faster if you just implement both and see which works for u
yeah
I made a script
that positions the effect animation
every time you click left click and make it show up in front of the player
but it ends up making the player run into the animation
but if I made it a child it would move with the sprite so it wouldn't make it run into it
okay
Alright but these are the settings I can change, right? Where could I change antialasing and anisotropic filtering for that sprite?
change filter mode
point will make it pixelated
That’s not what he’s asking about tho
He’s asking about anisotropic filtering and AA
The filtering listed here is just for smoothing out the texture
Granted I frankly have no clue what anisotropic filtering is, and not really sure how AA comes into play with sprites
@frozen anvil could you be more specific with what you’re trying to accomplish? I’m not sure the settings you’re looking for are actually in the import settings
More specifically how do you put bones on a game object?
Aight sorry. Quite some time ago when working on a game jam game I had the problem that my sprites outlines looked quite weird.
I did get a response, but that was after the jam ended so it didn’t matter that much anymore. However now im having the same issue so I once again looked at the response which was: Antialasing and enabling anisotropic filtering in the texture importer.
So Now im wondering what exactly that means.
I actually think in this case it has to do with the scaling of the camera
It’s zoomed out enough that the outlines of your sprites are less than a pixel
Bilinear filtering might help, if not, I think that anti aliasing and other graphics settings are in your project settings, not import settings
Ok thx, I’ll checkt that out once im home :)
why does my capsule look pixelated in game and how would i fix it?
I would assume it's small and you zoomed in the game window
ye the pixels are the same tho i just zoomed it to see it better
The filtering modes set how the pixels of the texture are interpolated- you need to set it to a type that allows anisotropic filtering and have aniso enabled in project settings.
In your case you probably don't need it but it is available
I usually use trilinear filtering since it is basically free
is there a way i can make Grid components visible in editor
Arent they visible?
You might have the Gizmos button unchecked?
Is there a way to implement like a "raycasted" sprite mask or something? I have an issue where I don't want the fountain light sprite to be visible in adjacent rooms, so I gave each room a big sprite mask and set the fountain glow to be only visible inside the mask, but of course since the room next to it also has the same sprite mask, the fountain glow still shows up in the adjacent room..
so like something like this
Select the sprite in assets, click sprite editor, sprite skinning and add bones
I guess what this is leading to then is that allowing for character customization while only retaining one set of animations across all is not possible? Like I would need sprites or psb files for each variation?
Or you could parent to anchor an object and for each sprite set up a skin
Then you could swap out sprites but it would need a bit of setup
Ok I guess that’s what I was a little concerned about, so essentially this way to maintain the full “bone” setup that I’m looking for, even each part of a limb has to be its own sprite attached to a game object, because it can’t be rigged. For example, upper arm and forearm game objects instead of just an arm that can be rigged in the skinning editor
You could try doing something in “secondary textures” tho i never used it
nope
enabling the grid in the hotbar gives me this, but it's not the same size as any of the grids i have in my scene
gizmos are enabled, still cant see them
jumping
i cant get the jumping animations
is their any video you guys will recomend
They look perfectly visible
yeah, but thats not my grid
Blackthornprod animation tutorial
im trying to make the grid component that i have in my scene visible, not the built in grid from unity
the grid i want to see, RoomGrid, is 416x240 units
the one that's showing up in unity is square and broken up into groups of 10 16x16 unit squares
I think the grid component is expected by unity to be uniform so if u want to visualize it youd need to use a script with drawgizmos method
so displaying the grid isnt built in?
Correct
ic, thanks
holy shit, i was wrong
the grid is there, its just so god damned dim that i need to squint extremely hard to even see it
is there a way to change that?
and once again, this is not unity's built in grid im talking about
my grid is visible even if that one is disabled, it's just extremely dim
i cant get the jumping animations code
That is what the 2d lighting is for. You could also do similar with a custom raycasted shadow mask.
That sounds like a lot of effort for what I'm trying to do, I'll just ignore the issue ahah, thanks though
I just spent 4 hours learning how to make a procedural grid that wraps to world space and fills the entire scene view because unity's built in grid sucks so fucking bad that you cant even change the color or clipping distance
im watching a tutorial when the enemy rotates to look at the player on his video it looks like this
but when i do it
it looks like this
@spiral monolith can you clarify what you're looking for? If you're asking about the sharp aliasing on your sprite, you can change your anti aliasing settings in your project settings iirc, or you may be able to fix that by enabling bilinear filtering on your sprite's import settings
oh sorry ye i want it to look sharper
but what u said didnt work
What do you mean?
Im wrong anyway but does it behave like paint if u draw a square diagonally on paint it will look like that
man doesn't know what resolution is
I thought i was 99% wrong but i just wanted to ask
Hm well the issue does only occure when the sprite is quite small. However no matter how much I zoom the camera, if the image is a lot smaller than the camera it gets this weird effect. Could maybe the resolution of the image just be the problem?
wait I think turining on generate mip map fixed it
though now it looks a bit blury :I
Nvm all good now
In Unity 2022 transparency not showing properly, Does any know how to solve?
- Unity 2019
- Unity 2022
- Actual Image
??
You didn't show your settings
When I try to create a sprite material, the box where I put the sprite in is blurred out and when I double click it it just takes me back to the assets folder
Most sprite materials automatically get their sprite from the sprite renderer component
But it’s a material that can’t have the sprite renderer component?
I want to use it to add a 2d sprite into a 3d game as it seems to be the main way to do that
Well, you really aren't giving any useful information to solve it. This is a built in material or a custom one? What kind of renderer is it?
idk if this error relates to 2d but it lists it as 2d and have no clue on how to solve it
What do any of you recommend for learning how to make a good looking 2D art for UI and a 2D game like a player and parts of the world etc
You put a regular 2d texture into a slot for a cubemap
Has anyone have issues with 2D Sprite package, the bones are flickering in my scene making them very difficult to work with?
I've not seen that personally though I've heard it mentioned. What version are you using?
Hey, my material is not working correctly. Can you help?
You've given no indication about what's wrong
It’s the color, it looks much lighter
Yes because of lighting. If you want a solid colour that is unaffected by light, use the unlit shader.
Thanks!
Hi. I don't know where to ask this. I'm following this manual page https://docs.unity3d.com/Packages/com.unity.2d.pixel-perfect@5.0/manual/index.html. I'm at the "Snap Settings" section. It says to open the snap settings in Edit > Snap Settings, but I don't see them there. I found out there is "Increment Snapping" option on the top bar of the scene view, but I don't know what it actually changes and if it's the same thing as it doesn't seem to affect anything.
The manual also says to select "Snap All Axes" on each game object, but I can't find this option.
So my question is, where do I find "Snap Settings" and what they actually do and where I find "Snap All Axes" settings of a game object?
By trial and error I figured out that Snap Increment doesn't seem to be doing anything and I want to use "Grid Snapping" and that it also has the "Snap Axes" option
I have a background image and it looks fine on the scene view but in the game view it’s gets more pixels (blurry) 2D game
Screenshot it
what should i use to make 2d pixel art
?
easy google question
aseprite is the best but is paid
idk abt free ones
I heard gimp works with some setup
ty
😭 uuohhhh how do i offset the texture of a tiled sprite renderer, setting material.maintextureoffset does not work for the default sprite shader
Sprite renderers use offset internally to figure out which sprite to display and to ensure that it has the correct physics and sprite shapes
Why do you need to offset it?
im setting up a tiled liquid system that displays a top surface and a tiled body
the liquid rises up and down, with the body filling the entire volume below the surface
but as the liquid rises up and down, i need the tiles of the body to move at the same rate as the top surface, right now the tiles in the body are completely fixed in place
a little busy atm but i can post an example shortly
what i need is a way to control the offset of the tiled sprite
i could get around this issue if i could somehow set the pivot of the tiled section to the top instead of the center, really pretty annoying that everything in unity uses center pivots honestly
box colliders have an offset you can assign to change the pivot point of the collision, there isnt a similar thing for sprite renderers is there?
see how the body of the liquid volume is fixed vertically? This is what i need to change
public void Update()
{
float height = m_TideMaxHeight - TideAmplitude - (TideAmplitude * (float)Math.Sin(TideFrequency * Time.time));
float deltaHeight = m_TideMaxHeight - height;
Volume.size = new(Volume.size.x, height);
Volume.offset = new(m_Offset.x, m_Offset.y + ((height - m_TideMaxHeight) / 2));
SurfaceRenderer.transform.localPosition = new(Volume.offset.x, height - 8);
BodyRenderer.size = new(Volume.size.x, Volume.size.y - 16);
BodyRenderer.transform.localPosition = new(Volume.offset.x, Volume.offset.y - 8);
}
basically im just centering the body on the portion below the surface and scaling it out to fit
but i think the way that center point moves is causing this issue
if i could place the pivot of the bodyrenderer below the surface and expand the tiles out below that, it would be the ideal way to do this
but im not sure if spriterenderer supports this
uhhh
oddly enough, if i flip the y of the spriterenderer it seems to work perfectly fine
for some reason
well that solves that issue i guess
for some reason
What is the easiest way to add black text outlines to make a white text visible, for ui text components
As i know the default text components doesnt have outline feature
When i set the color blue they become entirely blue and doesnt have the outline
My guess is that you set the pivot to the bottom of the sprite, so flipping it puts the pivot at the top?
Use TMP instead of default text, it includes outline coloring among other features
I think this is actually it, not at my pc now to verify but I believe my tiles have their origin in the bottom left corner
In any case I’ve decided that a better solution would be to take the time to learn HLSL shaders and just write a shader to accomplish what I’m doing
I’m going to need a shader to distort the liquid surface anyway, so why not handle the tiling of the liquid with the same shader
Thanks for the help tho, I wouldn’t have ever realized this if you didn’t point it out lol
Hello, could anyone make a few sprites like trees, factories, various types of noodles, etc in a bowl following this style(it is the picture) I can't pay but would be greatly appricated
No.
If you want custom assets for low effort, it is possible to use Free trials for AI text-to-image (stable diffusion etc.)
By reading online and in the community of the generation tool, you can learn how to generate multiple sprites at the same time, and learn how to improve upon them.
Other than that, there are a good number of Free Asset sites online.
theres some good assets on itch.io
also, im confused on something on unity2d
ive got a somewhat basic base for a level
how to i make the camera align with the start of my grid
overhangs a bit
I suggest using pixel perfect camera
You can set the exact resolution of the camera plane with that to ensure lines up with your tiles
It will also prevent a lot of other issues
ok
Yeah I just don’t want people to point out that I got it off of the internet along with copyright trouble if I decide to release it
so use some free open source ones and check any licencing thing
for example
https://0x72.itch.io/dungeontileset-ii
Doesn’t the CC0 license is free and doesn’t require personal or commercial uses to attribute to the author
i think it entirely depends on who made the assets on whether you can use it or not
Well anyway thx
yo can someone help me I'm watching a tutorial and I don't know why my C# script isn't working
Is there a way to render 3D objects between specific tilemap layers
currently im rendering liquid volumes to a quad, but the rest of my game is done with sprite renderers
Hey all, any idea how to adjust the default import settings for Texture 2D's?
Mesh renderers actually do have a sorting layer, but it is only accessible via script
Hey, I'm struggling to understand how to make my sprite look good in game (2D).
First of all, is there a difference between increasing the PPU and reducing the scale of the object?
Problem is that if I increase my PPU (or reduce the object scale), I lose a lot of information, like my sprite contours with no filter, and blurry with bilinear filter. If I decrease it too much, it's pixelated.
I know there's the pixel perfect option of cinemachine, but I'm not doing pixel art which is to my understanding the point of the option.
Last thing I can play with is the scale of the sprite itself, which I can't make too big for performance issues with the skeletal animation.
Any help? I'd like to know how to set this up correctly cos I've redone it quite a few times now.
Alright found something that fixes the problem, setting PPU to the resolution/2*orthographic size makes it so no information is lost at all when the sprite moves (which is what the pixel perfect thing does I assume). Dunno how I can handle different resolution tho.
PPU changes sprite size just the same as scaling the sprite, but it lets you assign consistent values for every sprite to guarantee each of them has the same display resolution mainly in the case of pixel art
There's no magic option to make sprites render good, mostly you get the best results when you render them as close as possible to their native resolution
Actually there's an additional problem, images aren't rendered in the same way in editor and in build.
It's like there's an anti aliasing or a filter
Are you comparing build and game window, or scene window?
Game window
Why wouldn't it?
It's the game view not scene view
The game view's "scale" slider is just an editor tool for taking a closer look at things
Same result at 1x zoom
When built, I get shades of grey and other color mixed in like the filter mode would do on the character's contour
Kinda weird screenshot but here goes
Left one is game view, top one behind as well, but with filter in import settings, and right bottom one is the left one built
It doesn't double the pixels, they're just not black
I would assume the game is not played on the same resolution as the game window is previewing it on
If you want crisp pixels consistently you'll need the pixel perfect camera component
I can't find the same options that are in quality in player. it's full HD in editor, and I'm playing it full screen with full HD monitor and I got "default is native resolution" checked in.
Also pixel perfect camera is weird, with a lower resolution you just see less of the scene right
So it's basically change the orthographic size of the camera to fit PPU (which is what perfect pixel camera does), or have as much times each sprite in different sizes as there is resolution available, which is hell
Working in vectorial for graphics but still, hell
It's pretty pointless to try to ensure the graphics look good on just one resolution
That's what pixel perfect component does, but includes all viable resolutions
Regardless, if it doesn't work in one resolution, it won't work in any
I'd really like to understand what I need to do for it to work the same in build and in editor
Like I said, if you want to guarantee the sprites are rendered at the exact same resolution, use the pixel perfect component
I'm quite sure they're different because the display resolutions don't match
Currently looking how I can check that
Logging Screen.height and width gives the same thing, 1920x1080
In build?
In build and in editor it returns the same thing
Is there anything affecting the import settings? I'm very lost in the player settings.
None that I can think of
Thanks for the help anyway, will continue looking into it
TLDR in case someone else see this :
sprites don't look the same in editor and in build, resolution is the same (left is in build, right is game view in editor, zoom 1x
The pixel sizes are clearly different
Or the sprite sizes are? I'm not sure actually
That is true I didn't notice
I mean that's probably the cause of the issue. Problem is, idk why the resolution would be different, I set the default resolution to 1920x1080 in player settings instead of native resolution just in case. Debug.Log(Screen.height) gives me 1080 as well in the player log
The pixel size aren't different cos it's the same when checking the fox on the right. More information but more confused as well
Seems that the pixels are actually twice as big, with their values being averaged, which apparently is called mipmaps. No idea why that happens tho
SOOOOOOO... mipmap was the right track, deactivating "generate mipmaps" in the advanced part of the import settings fixed the problem. Problem is, Enable texture streaming in play mode is supposed to be checked in project settings -> editor for this to happen (it wasn't). So, bug I guess
Thanks a lot, I would still be lost if you didn't notice this.
How do you all handle bottom of tilemap walls?
Transparency mode works great for props and top walls but since the walls have colliders I can't see a wall at the bottom. Is the only way to do this to create a special "bottom wall" layer for sprite layering and then another for the collider?
Hello! I am trying to get a lineRenderer to outline a sprite, but can't find a solution. Any ideas on how to do this?
When using a custom outline for a sprite, am I supposed to use simpler shapes?
The point of it being custom is that you can choose
Can you explain what(and why) you are trying to do this?
Hmmm right channel? I'm not sure. But I need some tips on how to fix a certain problem I have. How do I set the pivot point to the exact same location on each sprite in the sprite editor?
I have sprites that look like this, this and this which makes it hard to put the pivot point directly on the upper body
When you say 'the exact same location' what does that mean? The same anatomical location? That information isn't present in the sprite data unless you exported it from whatever software you used to animate it.
(usually as a json or xml file)
I'd want to put the pivot point right under the mask
Is there like some technique I can use?
Like adjusting the width and height in a certain way to make this easier or smthn similar?
Not really one to automate it. Shoebox tools can be helpful but it won't, like, automatically find the right point on a changing sprite.
Usually for sprites that move around a lot like that you put them in a regular grid
So that the same pivot location is always correct.
My spritesheet looks like this now, so it isn't really fit for splitting by grid
I don't mind if it's automated or not. I'll go check what a shoebox tool is rn
I'm just starting to poke around with Unity 2D tools and I'm investigating Sprite Swap - does anybody know if I could set up a flipbook sprite walkcycle, then swap out that sprite set for an identically numbered set of sprites?
Not with Sprite swap. But you can set something like that up with a flipbook shader or something.
Ah, that's useful to know. Okay.
https://www.youtube.com/watch?v=6mNak-mQZpc <- solution.
In this video I will show you how to use 2D Animation package and its Sprite Resolver and Sprite Library to create reusable 2D animations.
Previously if we had multiple characters with exactly the same animation we have do create Animator Override Controller and recreate every animation using the sprite for the other character. This was a lot o...
Hey
How can I use Skybox in 2d game?
If I set skybox material my skybox is black and my game is buggy...
Those are my settings in camera:
Generally you don't use a "skybox"
Skybox is a 3D image rendered at focal infinity, so you need to be using a perspective camera to render it properly
With an orthographic camera you'd use 2D sprites with parallax instead
skybox wouldn't even render if you use the 2d renderer
Hey everyone, I am new and I just joined because I'm working with tilemaps for the first time. Everything is coming together well, but now I'm trying to optimize. I have water tiles which you can not enter, and I have a set of border tiles which have custom colliders that fit together pretty well. But as you can see, the "in water" tiles have no custom collider set so they're using the automatically generated one, which is even worse! Ideally, I don't want them to have colliders at all, the border tiles should be able to form a wall to keep the player out. Is there any way to tell the tilemap that these tiles should have no collider?
compound collider
would that eliminate the inside colliders?
this is a single tilemap collider though, I'm not combining colliders
what would the composite collider do?
Update on my situation yesterday:
I completely reworked the spritesheet, hopefully splicing the sheet using grid by cell size will help...
Apparently it did not. Help?
The character is moving around relative to the cells, so the pivot won't be in the same place.
You'll pretty much just have to place it manually, probably.
right now, I'm switching character sprites based on the renderer (mainly because there aren't any inbetweens). Do you recommend I use an animator instead?
I mean, that's really up to you
customizable outline of game Container Objects
Sounds like there might be more practical ways to do sprite outlines
But since sprite renders are meshes, you could read the sprite mesh vertices and use them as line renderer points
so im making a 2d zombie shooter game and am wondering where I should put my background: canvas or the camera? also i have a joystick pack and it says it needs to be in canvas so now im really confused.
Do not crosspost, please
how do you change the border of a tile on a tilemap? I want to make some of my tiles have a diagonal border so it becomes a slope
nevermind
Anyone know why this is happening? Imported a 32x32px tile into the Tile palette and this is how it's painting the tile
This needs to be at 32 pixels per unit in the sprites :
Pretty sure you are at 100
Does anyone have an idea how I could make different color gradient on a sprite shape for the whole object?
Is there a way to stick sprite on Spriteshape too?
"Stick"?
By stick I mean the simple sprite follow the sprite shape nodes when I edit it.
I assume you would have to use a script running in editor to move its position to one of the sprite shape control points, an evaluated position between them or to the surface of their generated collider
I'm pretty sure the 2d example game has such a feature
Lost crypt, iirc?
You can make #archived-shaders to do that.
Thank you very much @solemn latch !
How can I layer tile maps above another
What do you guys think about using the program called "Spine"? I'm new into 2D and i dont fully understand if i should use it, i'm not a big fan of using external tools, I had bad experiences of those external tools giving more problems than help it provides
Is it like a "blender for 2D"? Should I understand it like that?
(I notice there are lots of assets in asset store who uses "Spine runtime library" that's why I'm interested on it)
Spine is far more than most people need, but it is a powerful tool. You can use the runtime library without spine(for testing assets).
I have this weird issue with sprite sorting, where if I call an event which changes the colour of the background circle 3 times in a row, it somehow becomes the topmost layer
and I did check and the amount of event calls seems to be good
huh, that even happens if the event does nothing with it
I guess when objects rapidly deactivate above it, it makes it jump to the front sometimes?!?!
And if you manually set the sprite sort layer?
I did, the ones who are above are in "time foreground" while the background is the only one in "time background"
Strange.
ye, genuinely stumped as to what could cause that
might just give the player a cooldown on using the ability so this error never happens :P
I don't know if this are the correct channel :/
My image folder have 250mb
But when I build the APK, the Log shows 1,7gb and the apk file is too big
Why this are happening?
How can I reduce it to create a small apk?
i have a card with an image on it. how do you make the image scale proportionally to the card
Can you elaborate?
nvm i got it
i meant if you had a card like this but you scaled it so that the aspect ratio stays constant
but i needed the dragon image to look like it was part of the card still
and not scale weirdly on its own
#📱┃mobile is where you'd want to look. I'm gonna guess that your image compression settings aren't ideal; and it can easily be a lot larger than your original textures if(say) you used a bunch of jpgs or something and convert them to uncompressed.
I did only use circles like this, but will ask around on there, thank you
Hi,
if i want to apply a swipe scroll feature like this demo:
https://www.figma.com/proto/WmFj0qduhZJVTh22qd6WzT/DEMO?node-id=1480%3A78&scaling=scale-down&page-id=0%3A1&starting-point-node-id=1480%3A78&show-proto-sidebar=1
You have a dynamic number of transform objects, extending vertically and scroll vertically only as well.
I can apply it by myself manually, but isn't as smooth as the demo.
Is there any robust package/code samples to apply that feature out of the box on transform object with a SpriteRenderer (not Canvas/RectTransform) in a convenient way?
So you have just how many of these uncompressed texture assets?
as in, in the entire project, or in that particular interaction?
In the project.
I have 2 spritesheets (one 500x500, one 300x300) and that 256x256 circle
for pixel art games I checked around and was told to not use compression to keep those looking sharp
That doesn't seem like gigabytes
ye, that's why I think the error is bizzare
as none of the sprites disappear, just the sorting gets messed up
Hi everyone. I've been trying to animate a 2d sprite and what I do in one clip seems to be affecting a completely different clip in the same sprite.
Would really appreciate if anyone could shed some light on how to stop this from happening and the reason why its happening?
Does anyone know what type of textures these are?
look more like materials
Im doing some experimentation with rendering a 3D character in a 2D environment, and i need the 3D model to be rasterized to the same resolution as the environment
When the window is upscaled, the character's resolution increases to match the window resolution, but the pixels stay at the same scale
Is there a way i can display the character to ensure it's always drawn at the correct resolution, regardless of the window scale?
Either use the pixel perfect camera with upscaling, or render the character to a render texture yourself and set the resolution of the texture.
i am using pixel perfect camera
ah, upscale render texture in ppcam did it
the other issue i have, i need to apply some sort of filtering to this downscaling
right now, this is purely using nearest neighbor
i need to apply something like bilinear filtering or mitchell scaling, otherwise theres extreme shimmering in motion, since theres no sub-pixel motion
actually, this might be a complicated problem to solve in general
I'm not sure if that is possible using the built in options, though of course if you make your own render texture you can
i need to apply a palette shader to the player's materials, but this would need to occur after the downscaling, otherwise the colors would be blurred
having issues getting the character to go behind the tree but infront of it when he goes around
Anybody know any 2D game design schools?
ive made an image in 4096x4096 res in photoshop but when i put it in unity it becomes a pixelated mess
ive checked every quality setting but it doesnt make it any better
do i need to change my canvas settings or something?
Everything will be a pixelated mess if you scale the viewport
where is that scale slider?
You'd probably want to look into custom sorting axis
At the top of the 'game' window.
It actually scales up the window, rather than increasing the resolution, which generally makes it ugly(especially at non-integer scales).
can anyone help me properly slice up this spritesheet? I cant seem to do this 😭
I cant figure out what dimensions to put into the sprite editor slicer
14 x 5
Assuming that the cells are even
ohk thanks man that works
Because the auto generation is based on the pixels but isn't very good; you probably want to manually set the collider shape.
so i just shouldn't use the tilemap collider at all whatsoever?
you have to change the shape in the sprite
Hi! I have a problem with the unity visual code. I am trying to make a 2d platformer but I can't make the character to turn around when x value for the movement variable is negative. I used the axis Horizontal for the left and right movement. If I set it on the key it work but not with the value. I tried a lot of tutorials but I doesn't work at work. Can someone please help me?
@solemn latch Can you help me create a proper tilemap out of this? What dimensions do i put in the sprite slicer
Do you not know how to count?
Because it sounds a lot like you just want me to count for you
Don't even have to count if you just try with grids of common sprite sizes
I changed the collider in the sprite editor with a custom physics shape but it won't update, anyone know how to fix it?
Hey, I wanna create a mining and building sim on a round 2d planet but I don't really know where to start. Does anyone have any pointers how I could go about that? I already made a game in unity and know how to code.
Where to start would probably be coming up with a more concrete idea of what you want to do, since that description is pretty vague.
So I made this main menu and for the background I am going to be making it using a tilemap. But when I try to put some buttons in the scene they are rendered bellow the tilemap? Any ideas on how to make them render ontop?
Hey there, i was working with sprite sheets, slicing then, when i noticed some errors on the sprites. Is it possible to fix those without having to slice the sheets again?
Yes, as long as you don't actually change the positions of anything you can update the image file.
@thorn leaf
yeah
Do you have an idea ?
let me check
okay whats the problem which one u want to be bg
give it 1 on order in layer
and which one u want to give it 10
I want the sign to go above
k
write if it works
not from here
Sprite renderer>Additional settings>order in layer
yes but where "sprite renderer" when I click to the bg
I can stream for you if you prefer
just click anywhere then click again to the bg
someone please
i have been trying to figure this out for days
i have this muzzle flash
its a sequence
i want to play it
i have tried converting it to mov and i got a transparant mov through blender
i tried converting the mov to vp8 ogv/webm
it is always a black background when i put it into the video player
i figured it out
without a sprite sheet
i had to set them all to multiple and slice them
that's what a sprite sheet is
Heya- I'm trying to import a texture into Unity..
I need to have the following settings
format: ARGB32
graphicsFormat: 87
Although the closest I can seem to get is
format: RGBA32
graphicsFormat: R8G8B8A8_SRGB
Does anyone have any idea on how to get the correct settings in editor?
^^ I might add, when I load the texture from the png at runtime I get the correct settings, but when I import the texture in the editor I don't
does anyone know how to replace tiles in a tilemap with new ones without having to rebuild everything?
basically i had ground tiles that i used but i made new ones
guys, what is a easy way to get smooth roundlike corners like this without blurring whole image?
Why is the zero black when i set the color to white? It used to be normal it appeared when i opened unity last time
blur just the edges ?
is it black on all colors ?
Nice, as the problem appeared itself, it also fixed itself. I opened unity to check it and its white now.
why are there tiny gaps in my tilemap
Tile resolution and pixels per unit probably do not match
When i view the game through the small window, the text looks like its intended. But when i maximise it, the text is in its original size, so its small compared to other objects. How do i make so that the ratio of the size of other objects and the size of the text is the same?
Anchor points of individual elements, as well as the canvas scaler component of the canvas determine how the canvas adapts to different screen sizes
How come every time I finish my map and save it, it turns into the previous level?
LVL7 and LVL6 is the same, no matter what I do
I've tried saving the scene
NOTHING
I've tried saving the project
NOTHING
it is getting on my nerves
how do i make a tilemap and put tiles on said map? i tried making a tilemap and putting it under a grid like google told me but i cant put my characters or background on the tilemap
You'll need to elaborate on what your character or background are and how you're trying to put them on the tilemap.
im making a strategy game and i want people to be able to move the characters on the individual tiles of the grid but the characters are not snapping to the grid like i want them to. I also want a visual background grid so people know where they are moving but that isnt snapping to the grid correctly either
The "snapping to the grid" needs to be handled in the character movement code. As for the background, I'm still not sure what you mean. Maybe record a video or something.
a visual representation of the grid
Can you add an object to scene lvl6, save and load scene lvl7? Does the object appear there too?
So it's not the background, it's the tilemap?
Well, I still do t quite understand what the issue is. Maybe share some screenshots or video that demonstrates the issue.
I'd avoid doing that. Your character's should probably be normal sprite renderers.
If you're talking about it moving from cell to cell and be centered on them, when not moving, then you'll need to handle that in code.
i want to put them on the grid to make movement code easier perhaps
You don't "put" them on the grid. You just use the grid in your movement code.
Yes. But it's totally different to what you were asking before.
It depends on your movement, but in general, you'd sample the grid world to cell position and/or keep track of the current grid cell and iterate them when moving. I'm sure there are plenty of tutorials on that online.
well how do i get the character's cell if they arent on the grid
You keep track of it in code. It doesn't need to be physically "on the grid".
how would i track it
A Vector3Int variable.🤷♂️
I really suggest looking at some tutorials and reading the grid/tilemap manuals on how they work.
Hi everyone, I have a problem. I created, rigged and animated a 2d character, but I need to work with it in a different computer and everytime I export package and try to use it in the other computer all the animations are wrong.
Anyone knows what mightbe the cause? Could really use some help
are you using the same tilemap asset for both scenes?
Can someone help me plz. I wanna know how to make a 2d endless but connected road for an endless run game in unity 2d.
That's more of a #💻┃code-beginner thing.
Hey, I posted this question in coding because that's where I've been for the past few days but I realize that it may not be a relevant question there. Is there any shader that would let me place a 2D window asset on a 2D wall and have it be transparent, the same way it would be if I made a hole in the wall when drawing it?
I'd like to be able to place windows in the editor to figure out the composition with my other assets but I'm not sure how to make them versatile like that
Yeah with sprite masks
Are you using the same version of unity and 2d animation?
Yes, I'm using the same version in both @solemn latch
i am using a Sprite light 2d in my scene to overlay the original gameobject and give it glow, but when i put the sprite in, it turns blurry. alr turned point no filter on
Make sure your game window isn't zoomed in
I can see similar artifacting in the black background as well which suggests it's something full screen
Does it appear blurry with global lights as well?
yes
Then I'm not sure
I would double check that the specific sprite really has point filtering if you want it pixelated instead of blurry
the exact same sprite u can literally see on the right not pixelated
I'm starting a 2d project but I suck making assets but w/e.
Let's say I wanna make a card game for mobile, I set up mobile portrait camera attached to canvas, how do I know how big I can make my sprites i.e background? I have made a sample card but the resolution is disgusting
As a designer you would determine the largest size (or closest distance) that you'll want to show the asset as, and consider how big the largest likely screen or resolution is that it may be viewed at
pls still need help with this
Math!
yes!
Is that a thanks for the solution "yes" or a you understand my problem "yes"
I have one rly weird issue, the player's sprite gets one column of pixels cut off whenever it's flipped on the x axis (nothing gets cut when flipped on the Y axis)
What could be causing this?
also make sure the compression is set to "none"
nope still pixelated
Could you show a screenshot of the import settings just in case?
Maybe rotate the entire player?
Here, this might help
{
{
float move = Input.GetAxisRaw("Horizontal");
transform.position += new Vector3(move, 0, 0) * Time.deltaTime * MovementSpeed;
if (move > 0)
{
transform.rotation = (Quaternion.Euler(0, 0, 0));
}
else if (move < 0)
{
transform.rotation = (Quaternion.Euler(0, 180, 0));
}
}
}```
This rotates the entire character, so not the sprite only. Maybe this helps
sadly when rotated it's the same issue, maybe it has something to do with the pixel perfect camera?
can be the case
then I'm not sure why it would break the sprite when it's looking in one direction, and not in the other, as that happens regardless of where the player is positioned
if I have the player sprite rotated on the Z axis by a very small amount, it instantly fixes itself huh
which is hacky, so I wonder what an actual solution would be for that
alright I have a problem where I have prefabs spawning on random sides of the screen and moving to the other side.
the problem is that these prefabs (of course) all have the same sprite layer so they keep weirdly overlapping each other. What can I do against that?
set sprite pivot
is there any way to copy and paste patterns in unity tiles?
i couldn't bare to spend 30 minute doing the same thing over and over again
huh, you do seem to have everything set up correctly, this is def rly weird behaviour
i mean u can see it working on the right, just the Light2d Sprite light is pixelated
here the light settings
i can also disable everything but then its even more pixelated
@solemn latch I seen that video
If you have it set to multiple you need to actually double click on the other sprites to select them.
Otherwise you'll just be drawing polygons on the first sprite
okay, and how do I handle that part
suppose I rig everything seapretly
now how do I animate them
is it possible to put rules(like colliders, or slow down effects) to each tile in a single tilemap instead of having the same "rules" for each tilemap object?
They should still be using the same skeleton so you'd animate as usual.
hm ic
I do not understand what skeletons are, but I've gotten far enough to animate them independently, treating them as different gameObjects
Skeletons are hierarchies of bones that vertices of the sprite are skinned to.
So you animate the bones rather than moving the sprites directly.
If you don't need deformation/bending then just animating the sprites is fine and doesn't need a skeleton.
the console says Assets\Item Pickup.cs(62,14): error CS1002: ; expected
wh-
where?
This seems like a #💻┃code-beginner question.
Also, #854851968446365696 describes how to post code here, and this was not that.
Seeing as the problem in your code was so blindingly obvious, I imagine your IDE is also not configured. It should be underlining errors in red and giving you proper autocomplete. The instructions for configuring it is also in #854851968446365696
(i used the thing called chatgpt so i didnt know that much)
Yeah, we'll be banning questions using code from chatgpt soon because this is absolute nonsense
and it is in 2d so yea
dam
Hello mates!
Today i want to fix my (rope)
I just did hinge joint between player and cat
And added line render
What i should do?
I want that this cat will have influence only on player position, like additional tail/weight, like you see its also rotating player 😦 and making problems in player controlling
https://youtu.be/lXvrS08KevE
How do I achieve this grid locked movement? I have already a grid generator with tiles in it and each tile knows its neighbours + cards can be dragged
Boss attack patterns:
- Vertical (2)
- Impare Skills or Cross(All) - if boss use impare skills here, then turn 6 will be cross(all) and vice versa.
- move only
- Zantetsuso + Summon Bomb
- Vertical (2)
- Impare Skills or Cross(All) - see turn 2
- Life Drain
- Summon Mobs + Vertical(2) then repeat from turn 2.
Tips:
- Don't bring element...
Got told tilemap system could help, righ now I'm generating the grid, giving tile object their coordinates and with a tilemanager finding neigbourds and adding to each tile their own neighbours
I basically wanna redo this game with terrain
Hi all, I have never done a 2d game in Unity, I got tons of experience with 3d but nadda with 2d
I want to make a 2d pixel game for a game jam, I have a couple of questions; is there a tutorial that can explain the basics of 2d unity to me? What is the best software/website etc for creating pixel art?
For creating 2d pixel art I got advised aesprite
aseprite
brackeys has a lot of tutorials on 2d
any feedback on this?
can anyone tell me where i can find titled 2D map editor tutorials?
better if videos
there all outdated
if you mean the "Tiled map editor", there is a few tutorials on youtube + there is an active discord found on the main website of the tool
can u send me the discord if you can please
sure, in a sec
I have this weird issue with the pixel perfect camera, as I'm trying to add in blinking on a separate layer, and even though the eye is positioned correctly in the scene view, the pixel perfect script kinda forgets about one of the two pixels.
What would be a good solution for this?
hey so i was wondering how to splice a tileset properly in the sprite editor? i have this tileset and it splices some of them correctly, and cuts off the other ones
you need to put the tiles in a way that matches the grid, as it seems some of them are slightly offset
do i have to adjust the individual tiles?
on the source image move the ones which are offset incorrectly
hello, I'm not very good with textures and stuff so I need help.
I have this 2d 512x512 stone texture and I want to add it to a ground (2D rectangle not top-down), but it doesn't let me drag and drop it or anything.
How do I apply the texture onto the ground and make it repeat?
you have to make a material
Drag texture into albedo
here is how it turned out
the white lines are from the camera
ok I fixed it somehow
It looks like your tile size doesn't match your grid
That looks like grayscale to alpha was checked or something
I added Universal Render Pipeline for lighting and now the textures have the shader "Universal Render Pipeline/2D/Sprite", and it doesn't apply on anything
Have you done any tutorials?
nope
I mean, I did watch the brackeys video for adding lightweight render pipeline
oof
so what do I do now?
I can't add textures to my ground, it's just a colour
the texture works on a quad
I think you sould do more research.
Because you're asking for help on really really basic things and you're just going to keep asking more basic questions, and no one has the time to build your project for you
I've been searching it up for the past hour
Gamedev isnt easy
bruh I know
It should take you a long time
that's why I'm asking here
ok thank you
i have a script which exports textures from photoshop and then import them to unity and then another scripts which setups the scene with help xml file generated by 1st script.
the script was working in 2019.4.31f1 but recently i switched to 2020.3.38f1 and for some reason it's not working there is no compiler issues in the project and it's for some reason giving me null reference .
This is the error, the most i can make out is due framework changes or something along the line which is why i'm getting this error.
NOTE : this is just the top line of the error it has many more lines if needed i can provide them.
UnityEngine.Object.Instantiate[T] (T original) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:277)
does anyone know how to make the blocks on the scene even?
Can you rephrase the question?
On the area with the background, there is a grid and I want to make the grid the size of the blocks or vice versa but I don't know how
Sounds like the texture's pixels per unit value doesn't match the sprite sheet
Hi, so im working on my project and I can't get rid of the lines between the tiles. I turned off Anti aliasing and created sprite atlas, but the problem still remains. Any fixes?
how do i fix it
Change the texture's pixels per unit value so it does match the sprite sheet
Is the background in perfect position? It might just be that either your tilemap or your background are displaced
The default PPU value is 100, but most sprites are designed for something closer to 16 which makes them really small relative to the unit grid
What ppu did you set when you sliced the sprites?
Wait, that also by the problem in my case xD
Nope, it's not the problem
Wait, i fixed it with setting the right resolution, nice
i know my comprehension with words is miniscule but i have no idea what you're saying
no offense ofc i have legit 0 knowledge with unity
anyone know a good way to remove a background but keep things like shadows or effects in any 2D suite? Photoshop?
unless those effects are on a separate layer, it will be difficult
For some reason this small two-pixel sprite has one of the pixels in the wrong colour in game view when using the pixel perfect camera, how could I fix something like that?
Why does Unity wash out/remove certain colors on my 2d sprites? Can't seem to find an answer online on what settings I need.
It's very noticeable on the chest sprites
when i do that it ends up like this
post the actual texture?
Yeah, that one makes me even more suspecting that the actual tilesize is much smaller
if someone experienced with grids and grid placement movement please dm me I don't bite
Hey uh
I'm trying to make a 2d Rig where I can switch out the torso ui and replace it with a rotated torso sprite in specific moments during it's run animation
Problem is, I'm not sure whether to use multiple rigs or single rigs, and if multiple, then what bodyparts do i keep together, which do I split
because the last time I used multiple, I had to parent all bodyparts to the same skeleton, and then use separate animators on each bodypart, it was hectic.
also in single mode,
I can't find a way to split my bodyparts, and I don't want to go back to Aseprite and move them further apart
ooh ur right, thank you
You can just draw your own polygons around them? You'll need to use the edge tool to make them into separated pieces.
Though obviously moving them apart in your image editor would be better
Anyone have a good tutorial on adding logic to my Tiles? I want to create a game similiar to Oxygen Not included, so marking a tile as mineable and have it be destroyed and drop ressources. The Docs on Scriptable Tiles are confusing and seem to be focused on having dynamic tiles that change their sprite depending on what's around them and not about actually having tiles as some kind of interactable gameobject
Hi people! I am reading the manual page about the Sprite Atlas and there is a thing I can't understand
https://docs.unity.cn/2021.1/Documentation/Manual/class-SpriteAtlas.html
After I generate a Sprite Atlas, should I delete the sprites I packed into it from the asset folder or not?
An other thing not clear to me is: if I have prefabs using sprites from the asset folder directly, and I generate a sprite atlas with those sprites packed in, the prefab will refer to the original sprite or to the one in the sprite atlas? Should I delete the prefab and remake it?
is the heart sprite on the ui?
No, It's a sprite
is it scaled down?
it might be becuase you have floating point values on the position
pixels dont work based on real numbers very well
changed position to (0, 3) still gets distorted
what's the sprites pixels per unit
have you tried messing with the pixel resolution in your ppu cam settings
dont know if youve been answered or not but if im correct you should put compresion to none
instead of normal
Can you have multiple sorting layers within a tile pallete?
like if i have a "farbackground" palette, with mountains and hills, and i always want the mountains behind the hills, how would i do this?
Put them on a second tilemap and put it behind the other one?
True but then i'd have a shit ton of tilemaps for every tile
how to fix this thing
How does one combine tiles to form a larger tile asset I don’t know how to ask this question into google to find help
Like to make a house one large “tile” so that the position sort will allow the user to go behind the house instead of single tiles
I guess you're looking for the sorting group component
Okay I think that’s right I’ll test it
Thank you
May I ask one more question? Kinda goes along with that wanna see if you know
Are you able to change the transparency sort mode through script?
I tried to look at Unitys docs on it but it doesn’t have examples
Nvm I’m bad I think I found an example
What do you mean by transparency sort mode? I recall all sprites normally are sorted and rendered with transparency
i'd like to do something like this
but i am using URP
so i'd need to change it in here, not in the settings like the example showed
but I would only like to change it in here on scenes that need it and when UI is not opened
I see!
I am unsure how to change this whenever I would like, as in when the UI opens I make it not do this then when it closes to do this
UI open -> change to default
UI close -> change to custom with 1 on y
Does it not work if you change GraphicsSettings.transparencySortMode when the UI is opened/closed?
no because there is no option in graphics settings to change this after using urp
i'd assume because this takes over
another reason not to use urp for 2d games
Right, GraphicsSettings is the BiRP way of doing things
how would i have used lighting without it?
with a 15 dollar asset
link?
nvm 14.50
usd
ah i own that i just never set it up
i like the original lighting more but maybe i havent looked into it
or got a feel for it
i got it in some humble bundle pack
nice
so you'd recommend that?
how much effort is it to transfer scenes over would you say
i haven't used it, but i can't reccomend urp for 2d
it will limit you more than it helps
hm
man i know it'll break my game for a long time if i decide to switch over but i also know the earlier the better prob
cause i dont know what i dont know
at least the 2d renderer that they made for urp
you can probably just edit the scriptable object of the 2d renderer if you really want to stick to 2d renderer
open up the 2d renderer script and see what it's dependancies are
like the namespace
it's probably unityengine.rendering.universal or something like that
ill make a new project and implement urp then replace it with this
and see how ridiculous the transitions is
also one dumb thing about 2d renderer shadows is that it doesn't project shadows
it only does lines
with the asset you can see the shape of the object in the shadow
the 2d renderer was built specifically to make the lost crypt demo in order to show investors
yeah i noticed that and kinda accepted it
seems like everyone has lol
It's good to have options
I'm frankly very confused where the TransparencySortMode setting is supposed to be changed from in URP
URP scripting API doesn't have it and neither does Core RP Library
It's also a camera property so that's one option
yeah thats why i came here lol
the whole thing seemed like it wasnt meant to do what i wanted it to do
have you tried making a script that uses the UnityEngine.Rendering.Universal dependency with a field of Renderer2DData to access the 2drenderer and changing it's properties?
@elfin sandal i feel like id break things
but i think i am on some right track
im using this i found
it manually sorts the layers lmao
might work
hi there, i was working on an isometric game in 2D and get a really bad case of z-fighting inside my tilemap. can someone tell me how to get rid of this?
Additive Scenes... if wanting to use dozens of these at the same time, like more capable prefabs, is there any overheads to worry about from each extra Scene?
Probably, but this isn't really the place to get a good answer.
Is there a way to turn the hexagone in a 90 degrees without mixing up the coordinates?
I know I can do that, but it mixes up everything on the coordinates on the console :
I got it. I just need to play around with these :
why does using a spriteatlas
make the tiny white lines between sprites in tilemaps
go away?
First of all, please don't split all of your sentences into three posts; it really clutters things up for us mobile peeps.
Atlas generation creates padding that covers up the seams.
So I'm trying to create prefabs containing tilemaps but I'm struggling to figure out how I would make the "pivot" the center of what I've drawn in the tilemap?
Have a root object for the prefab at the position you want the center to be in?
Hello, I have a problem. Why does my objects get invisible when reaching this portion of the screen?
My objects are not destroyed, they're just getting invisible. Things are working fine when I set the background sprite to None.
Oh I got it. The background z position should be deeper than my objects.
Why is the bg flickering like that?
You need to use a pixel perfect camera. Unity has a package for it.
what is a pixel perfect camera? how is it different to normal camera?
It keeps the position of the camera in pixel perfect values so the art isn't drawn between pixels (which results in either double pixels drawn or pixels discarded, hence the flickering).
even worse!
turning off MSAA reduces it to one line
it still happens, flickering
Have you tried packing your sprites in an atlas?
it's a tilemap
Tilemaps can use packed sprites
I'm trying to achieve this type of room generation with rule tiles but I can't quite figure out how to set them up properly.
The walls I'm using are the same ones in this game. I can't tell whether I am supposed to create rule tiles for these that are 1x1 or 1x2 tiles
You can see that the walls cover up half a tile above them for instance
Here's a better example -- which one should I use for doing my rule tiles to achieve the same layout? 10x20 or 10x10?
Can the tilemap be useful for making topdown pathfinding, or is it purely visual and collisions?
has anyone come across any sort of better implementation of the UI for tileset?