#🖼️┃2d-tools

1 messages · Page 3 of 1

fallow vector
#

So the white line is the playable thing right, and inside is the playable zone (any assets you put inside will be visible when playing) and anything in the outside will not be visible.

#

I wanna line it up

civic knot
fallow vector
#

I’m not even sure lol

#

I believe so

fallow vector
#

@civic knot any suggestions?

civic knot
fallow vector
#

alr

#

thanks for attempting to help lol

zealous shadow
#

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

elfin sandal
#

Ui for things that dont move

zealous shadow
tardy temple
#

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

zealous shadow
#

hmmmmm true

zealous shadow
#

ok another question related to that... how do i make sure the pictures will be there if player changes the resolution of the game

elfin sandal
#

The ui can stretch

#

Just look up unity ui tutorials

fallow vector
#

It was the camera lol

cobalt shard
#

Awesome, thanks!

analog widget
#

how do i make sprites cast shadows?

elfin sandal
#

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

analog widget
elfin sandal
#

Git hub asstet store google

raven spear
#

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?

elfin sandal
#

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

raven spear
elfin sandal
#

Correct, you cant

elfin sandal
#

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

raven spear
#

What code gets the animator value and the animation that is playing?

elfin sandal
#

The animator changes a public variable on the oject your animating

uneven jetty
#

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

uneven jetty
#

nvm i got it working

solemn latch
uneven jetty
#

yeah i forgot to set anchors

#

everything was on center

analog widget
#

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

fallow vector
#

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

fallow vector
#

never mind baby

#

i got it!!!!!

zealous shadow
#

is there a way to apply shader graph to UI image?? ... not a quad a UI image... what type of shader should I use

bright scaffold
#

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?

zealous shadow
solemn latch
bright scaffold
#

Where can you see that? Probably

analog widget
solemn latch
languid pond
#

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!

analog widget
analog widget
# solemn latch 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?

solemn latch
#

You'd animate the position for each animation clip

analog widget
#

wait

#

can the animation also animate the position of the children?

abstract olive
#

Yes. An animation can effect itself and children.

analog widget
#

ah yeah thats done it

#

awesome thank you

#

where do i change the interpolation so its instant?

#

nevere mind i got it

tranquil ice
#

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?

scarlet shard
#

How to fix my textures coverting up my UI

#

Like for textures I can order with the help of SpriteRenderer, but what for UI?

solemn latch
bright scaffold
#

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

solemn latch
bright scaffold
#

A sprite

#

I've tried changing the ambient lighting, and plenty of other answers I found on google, but nothing helps

solemn latch
#

What exactly do you want to happen?

#

Are you using a correct material for your rendering path?

bright scaffold
#

For the material to go onto the sprite

solemn latch
#

Well, if it is changing the appearance of your sprite, that sounds like the material is being applied.

#

Show your inspector?

bright scaffold
#

here it is

solemn latch
#

It looks like the material is on there.

#

You'll probably need to add a texture for it to look interesting

bright scaffold
#

The material has a texture though?

#

And when I try to replace the white square, it doesnt change

solemn latch
#

Your material has a _MainTex property which is being overwritten by the sprite renderer.

bright scaffold
#

I click on the texture I want and the menu just closes

solemn latch
#

Because that's how sprites work

bright scaffold
#

So should I delete the sprite renderer?

solemn latch
#

You add the texture to the sprite renderer or you use a shader that doesn't get its texture from the sprite renderer

bright scaffold
#

Such as?

solemn latch
#

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.

bright scaffold
#

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

modest cargo
#

@bright scaffold I believe all your problems stem from using non-sprite materials/shaders on a sprite renderer

bright scaffold
#

Yeah probably as it all worked when I put it on a quad with a mesh renderer

wispy totem
#

Okay, I’ll shorten it. How do I make randomised tiles but with GameObjects instead?

elfin sandal
#

you'll have to make a script that inherits from gridbrush and then override the paint function

scarlet shard
#

But they still like cover up by UI

#

It's attached to the camera btw

elfin sandal
#

or sorting order if they're on the same layer

#

and it will apply to all children of canvas

scarlet shard
elfin sandal
#

just use the UI sorting layer and it should be on top

scarlet shard
#

Ohh ohh ok, thanks

full drum
#

can we activate perspective on a 2d project camera ??

solemn latch
bright scaffold
#

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

bright scaffold
#

I want the playercenter object to move with the player object, but it isn't for some reason

past cargo
#

i assume you selected the player object when moving them?

bright scaffold
#

yep

#

wait a sec

#

it works in scene view but not when I start the game and start moving around

abstract elm
#

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

solemn latch
bright scaffold
solemn latch
#

Odd

gilded wadi
#

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

still tendon
#

where do i make 2d art

gilded wadi
#

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

stable rune
#

Hey, would anyone know why my isometric tiles are looking like this on the tilepallet?

lunar vapor
#

I booted up unity today and my background is looking like this. I tried deleting it but nothing happens what do I do

solemn latch
#

What should it look like?

dusty hull
# solemn latch Can you be... more specific?

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

abstract olive
#

@maiden coral Don't crosspost.

maiden coral
#

oh srry

analog widget
#

does anyone know a good alternative to the shadow casting provided by urp? it looks really jjagged and ugly

lunar vapor
lunar vapor
#

After it crashed it fucked up the sorting layers

#

So I fixed it by creating another

small moon
#

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?

solemn latch
modest cargo
#

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)

mossy quest
#

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?

modest cargo
mossy quest
#

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

modest cargo
#

I don't fully understand what you're asking

#

There's no "alternatives" because tilemaps are a generic method to solve a specific problem

mossy quest
#

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?

modest cargo
#

You can use ordinary sprites just as well

mossy quest
#

Alright I think I'm being dumb actually, I think I understand now. Appreciate the help :))

modest cargo
#

Both types support collision information per sprite as well

mossy quest
#

Ah okay perfect, cheers!!

wooden escarp
#

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

celest widget
#

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

solemn latch
#

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?

analog widget
#

how can i fix collisions going through walls? im using continuois

#

bullets specifically

abstract olive
#

How are you moving your bullets?

celest widget
analog widget
abstract olive
#

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.

analog widget
#

alright my bad

heady gorge
#
  • 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
heady gorge
#
  • 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?
gilded wadi
#

is there a way to make grid components visible in editor?

gilded wadi
#

does anybody have a visual reference for what the parameters of overlapcapsule2d

wind kayak
#

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?

solemn latch
#

So if you change the grid cell size, change the tile sprite PPU to match

wind kayak
#

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

elfin sandal
#

Keep cell size 1

#

No need to change it unless you're making some weird ass game

wind kayak
#

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

elfin sandal
#

Theres a function that gets tile from world pos
Read the api

#

Doesn't matter if u use a composit collider

wind kayak
#

oh? sweet

patent acorn
#

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.

elfin sandal
#

Probably better to use a blit to make an oitline

#

Or using a render texture

#

With a shader

frozen anvil
#

How does one acess the texture importer?

elfin sandal
#

Its just the properties you see when you click on the texture files

#

I think

solemn latch
solemn latch
young sail
#

how do i make this tilemap solid (the player can stand on it without falling)

gilded wadi
#

Add a tilemap collider

prisma temple
#

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?

elfin sandal
#

either that or use another tilemap

prisma temple
#

Thanks, figured as much but wanted to make sure I wasn't just missing something 🙂

gilded wadi
#

probably preferable to have freely placed assets like that seperate from the tilemap

patent acorn
elfin sandal
#

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

patent acorn
#

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

elfin sandal
#

glad u got it working 👍

loud geyser
#

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

elfin sandal
#

change the orthographic settings

#

on the virtual cam

loud geyser
#

Thanks

loud geyser
#

Is there a list of indie developers …. Who do commissions work ?

abstract olive
loud geyser
#

@abstract olive thanks

frozen anvil
solemn latch
#

It is still a texture, even if you don't set it as a Texture2d type.

scarlet helm
#

can someone help me with 2d jump animation

solemn latch
#

Depends on what you need help with

proven latch
#

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?

urban garden
dusty hull
#

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?

elfin sandal
#

most times it's part of the sprite

dusty hull
#

yes but the effect can't fit in with the 16x16 character sprite

#

so should I make it a child of the player gameobject?

elfin sandal
#

depends on a lot of things

dusty hull
#

okay

#

could you explain some more?

elfin sandal
#

it would be faster if you just implement both and see which works for u

dusty hull
#

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

elfin sandal
#

so what's the problem

#

you fixed it by making it a child

dusty hull
#

okay

frozen anvil
grand coral
#

point will make it pixelated

gilded wadi
#

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

proven latch
frozen anvil
#

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.

gilded wadi
#

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

frozen anvil
#

Ok thx, I’ll checkt that out once im home :)

spiral monolith
#

why does my capsule look pixelated in game and how would i fix it?

modest cargo
spiral monolith
solemn latch
#

In your case you probably don't need it but it is available

#

I usually use trilinear filtering since it is basically free

gilded wadi
#

is there a way i can make Grid components visible in editor

elfin sandal
#

Arent they visible?

strong mica
#

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

urban garden
proven latch
urban garden
#

Then you could swap out sprites but it would need a bit of setup

proven latch
# urban garden Or you could parent to anchor an object and for each sprite set up a skin

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

urban garden
gilded wadi
#

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

gilded wadi
scarlet helm
#

i cant get the jumping animations

#

is their any video you guys will recomend

gilded wadi
#

yeah, but thats not my grid

elfin sandal
gilded wadi
#

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

elfin sandal
#

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

gilded wadi
#

so displaying the grid isnt built in?

elfin sandal
#

Correct

gilded wadi
#

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

scarlet helm
#

i cant get the jumping animations code

solemn latch
strong mica
#

That sounds like a lot of effort for what I'm trying to do, I'll just ignore the issue ahah, thanks though

gilded wadi
#

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

spiral monolith
#

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

gilded wadi
#

@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

spiral monolith
#

oh sorry ye i want it to look sharper

spiral monolith
#

but what u said didnt work

spiral monolith
#

wait i am stupid my bad

#

is unity2d like a grid?

solemn latch
spiral monolith
#

Im wrong anyway but does it behave like paint if u draw a square diagonally on paint it will look like that

elfin sandal
#

man doesn't know what resolution is

spiral monolith
#

I thought i was 99% wrong but i just wanted to ask

frozen anvil
#

wait I think turining on generate mip map fixed it

#

though now it looks a bit blury :I

#

Nvm all good now

limber hatch
#

In Unity 2022 transparency not showing properly, Does any know how to solve?

#
  1. Unity 2019
  2. Unity 2022
  3. Actual Image
limber hatch
#

??

solemn latch
#

You didn't show your settings

bright scaffold
#

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

solemn latch
bright scaffold
#

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

solemn latch
misty anchor
#

idk if this error relates to 2d but it lists it as 2d and have no clue on how to solve it

oak spoke
#

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

solemn latch
red coral
#

Has anyone have issues with 2D Sprite package, the bones are flickering in my scene making them very difficult to work with?

solemn latch
topaz mortar
#

Hey, my material is not working correctly. Can you help?

abstract olive
#

You've given no indication about what's wrong

topaz mortar
abstract olive
#

Yes because of lighting. If you want a solid colour that is unaffected by light, use the unlit shader.

urban tartan
#

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

loud geyser
#

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

elfin sandal
#

Screenshot it

frank badger
#

what should i use to make 2d pixel art

frank badger
#

?

elfin sandal
#

easy google question

#

aseprite is the best but is paid

#

idk abt free ones

#

I heard gimp works with some setup

frank badger
#

ty

gilded wadi
#

😭 uuohhhh how do i offset the texture of a tiled sprite renderer, setting material.maintextureoffset does not work for the default sprite shader

modest cargo
gilded wadi
#

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

cunning jasper
#

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

solemn latch
modest cargo
gilded wadi
#

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

oak spoke
#

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

honest glen
maiden furnace
#

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

gilded wadi
#

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

maiden furnace
#

ok

oak spoke
maiden furnace
maiden furnace
oak spoke
#

Doesn’t the CC0 license is free and doesn’t require personal or commercial uses to attribute to the author

maiden furnace
#

i think it entirely depends on who made the assets on whether you can use it or not

oak spoke
#

Well anyway thx

rotund hornet
#

yo can someone help me I'm watching a tutorial and I don't know why my C# script isn't working

elfin sandal
#

did you set up your ide

#

☝️

gilded wadi
#

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

lethal nimbus
#

Hey all, any idea how to adjust the default import settings for Texture 2D's?

solemn latch
mild zinc
#

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.

mild zinc
#

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.

modest cargo
mild zinc
#

It's like there's an anti aliasing or a filter

modest cargo
mild zinc
#

Game window

modest cargo
# mild zinc

Your game view is zoomed in so it doesn't reflect the camera's actual view

mild zinc
#

It's the game view not scene view

modest cargo
#

The game view's "scale" slider is just an editor tool for taking a closer look at things

mild zinc
#

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

mild zinc
#

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

modest cargo
# mild zinc

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

mild zinc
#

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

modest cargo
mild zinc
#

I'd really like to understand what I need to do for it to work the same in build and in editor

modest cargo
mild zinc
#

Currently looking how I can check that

mild zinc
mild zinc
#

Is there anything affecting the import settings? I'm very lost in the player settings.

mild zinc
#

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

modest cargo
#

Or the sprite sizes are? I'm not sure actually

mild zinc
#

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

mild zinc
#

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

mild zinc
prisma temple
#

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?

eager birch
#

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?

craggy sequoia
#

When using a custom outline for a sprite, am I supposed to use simpler shapes?

solemn latch
solemn latch
cold geyser
#

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

solemn latch
#

(usually as a json or xml file)

cold geyser
#

I'd want to put the pivot point right under the mask

cold geyser
#

Like adjusting the width and height in a certain way to make this easier or smthn similar?

solemn latch
#

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.

cold geyser
cold geyser
abstract raptor
#

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?

solemn latch
abstract raptor
#

Ah, that's useful to know. Okay.

abstract raptor
#

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...

▶ Play video
amber hazel
#

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:

modest cargo
elfin sandal
#

skybox wouldn't even render if you use the 2d renderer

alpine bone
#

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?

elfin sandal
#

compound collider

alpine bone
#

would that eliminate the inside colliders?

elfin sandal
#

yes

#

oh wait i meant composite collider 2d

alpine bone
#

this is a single tilemap collider though, I'm not combining colliders

#

what would the composite collider do?

cold geyser
#

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?

solemn latch
#

You'll pretty much just have to place it manually, probably.

cold geyser
solemn latch
#

I mean, that's really up to you

eager birch
modest cargo
fading crow
#

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.

modest cargo
#

Do not crosspost, please

twilit minnow
#

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

twilit minnow
#

nevermind

brave notch
#

Anyone know why this is happening? Imported a 32x32px tile into the Tile palette and this is how it's painting the tile

vestal tusk
#

Pretty sure you are at 100

brave notch
#

Thanks!

#

Yéti for President

vestal tusk
#

Does anyone have an idea how I could make different color gradient on a sprite shape for the whole object?

vestal tusk
#

Is there a way to stick sprite on Spriteshape too?

modest cargo
vestal tusk
#

By stick I mean the simple sprite follow the sprite shape nodes when I edit it.

modest cargo
#

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

solemn latch
#

Lost crypt, iirc?

vestal tusk
#

Thank you very much @solemn latch !

potent crown
#

How can I layer tile maps above another

marble glade
#

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)

solemn latch
tranquil ice
#

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?!?!

solemn latch
tranquil ice
#

I did, the ones who are above are in "time foreground" while the background is the only one in "time background"

solemn latch
#

Strange.

tranquil ice
#

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

earnest narwhal
#

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?

hardy wing
#

i have a card with an image on it. how do you make the image scale proportionally to the card

hardy wing
#

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

solemn latch
tranquil ice
desert drum
#

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?

solemn latch
tranquil ice
#

as in, in the entire project, or in that particular interaction?

solemn latch
#

In the project.

tranquil ice
#

for pixel art games I checked around and was told to not use compression to keep those looking sharp

solemn latch
#

That doesn't seem like gigabytes

tranquil ice
#

ye, that's why I think the error is bizzare

#

as none of the sprites disappear, just the sorting gets messed up

cedar dew
#

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?

onyx pond
#

Does anyone know what type of textures these are?

elfin sandal
#

look more like materials

gilded wadi
#

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?

solemn latch
gilded wadi
#

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

solemn latch
gilded wadi
#

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

solemn latch
#

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

gilded wadi
#

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

potent crown
#

having issues getting the character to go behind the tree but infront of it when he goes around

loud geyser
#

Anybody know any 2D game design schools?

round portal
#

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?

solemn latch
#

Everything will be a pixelated mess if you scale the viewport

round portal
#

where is that scale slider?

solemn latch
solemn latch
#

It actually scales up the window, rather than increasing the resolution, which generally makes it ugly(especially at non-integer scales).

nocturne niche
#

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

solemn latch
#

Assuming that the cells are even

nocturne niche
devout dagger
#

why are my colliders sloping like that?

solemn latch
#

Because the auto generation is based on the pixels but isn't very good; you probably want to manually set the collider shape.

devout dagger
reef cradle
#

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?

nocturne niche
#

@solemn latch Can you help me create a proper tilemap out of this? What dimensions do i put in the sprite slicer

solemn latch
#

Do you not know how to count?

#

Because it sounds a lot like you just want me to count for you

modest cargo
#

Don't even have to count if you just try with grids of common sprite sizes

sweet trench
#

I changed the collider in the sprite editor with a custom physics shape but it won't update, anyone know how to fix it?

stark badger
#

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.

solemn latch
golden dirge
#

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?

crisp widget
#

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?

solemn latch
robust folio
#

@thorn leaf

thorn leaf
robust folio
thorn leaf
#

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

robust folio
#

I want the sign to go above

thorn leaf
#

restaurant thing 1

robust folio
#

k

thorn leaf
#

write if it works

robust folio
#

where do I change the layer ?

#

here

thorn leaf
#

Sprite renderer>Additional settings>order in layer

robust folio
#

yes but where "sprite renderer" when I click to the bg

#

I can stream for you if you prefer

thorn leaf
#

just click anywhere then click again to the bg

thorn leaf
#

add me then vc

chrome scaffold
#

someone please

#

i have been trying to figure this out for days

#

i have this muzzle flash

#

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

elfin sandal
#

dont do what you're doing

#

you're supposed to turn it into a sprite sheet

chrome scaffold
#

without a sprite sheet

#

i had to set them all to multiple and slice them

elfin sandal
#

that's what a sprite sheet is

graceful gorge
#

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

harsh snow
#

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

mortal echo
#

guys, what is a easy way to get smooth roundlike corners like this without blurring whole image?

still tendon
#

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

still tendon
clear harness
#

why are there tiny gaps in my tilemap

modest cargo
clear harness
#

well then

#

pixels per unit was out by 4 pixels

#

now at 96 it works

still tendon
#

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?

modest cargo
steep dirge
#

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

proven umbra
#

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

civic knot
proven umbra
#

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

civic knot
proven umbra
#

a visual representation of the grid

civic knot
civic knot
proven umbra
#

yeah but visually shown

#

so how do i make the character a tile on the grid

civic knot
#

Well, I still do t quite understand what the issue is. Maybe share some screenshots or video that demonstrates the issue.

proven umbra
#

its hard to take a picture of the problem

#

my character isnt on an invisible grid

civic knot
#

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.

proven umbra
#

i want to put them on the grid to make movement code easier perhaps

civic knot
#

You don't "put" them on the grid. You just use the grid in your movement code.

proven umbra
#

how

civic knot
#

Yes. But it's totally different to what you were asking before.

civic knot
# proven umbra how

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.

proven umbra
#

well how do i get the character's cell if they arent on the grid

civic knot
#

You keep track of it in code. It doesn't need to be physically "on the grid".

proven umbra
#

how would i track it

civic knot
#

A Vector3Int variable.🤷‍♂️

#

I really suggest looking at some tutorials and reading the grid/tilemap manuals on how they work.

elfin sandal
#

takes a while to understand the API

#

for new developers

cedar dew
#

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

solemn latch
umbral olive
#

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.

cedar turtle
#

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

elfin sandal
#

Yeah with sprite masks

solemn latch
cedar dew
#

Yes, I'm using the same version in both @solemn latch

desert linden
#

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

modest cargo
#

I can see similar artifacting in the black background as well which suggests it's something full screen

desert linden
#

yes it isnt

#

@modest cargo

modest cargo
modest cargo
#

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

desert linden
valid flame
#

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

modest cargo
desert linden
mortal echo
lament spire
#

Is that a thanks for the solution "yes" or a you understand my problem "yes"

tranquil ice
#

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?

tranquil ice
desert linden
tranquil ice
still tendon
#

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

tranquil ice
still tendon
#

can be the case

tranquil ice
#

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

hard nimbus
#

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?

elfin sandal
#

set sprite pivot

gritty palm
#

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

elfin sandal
#

patterns?

#

you can do anything with unity tiles btw

#

if you just script it

tranquil ice
#

huh, you do seem to have everything set up correctly, this is def rly weird behaviour

desert linden
desert linden
#

i can also disable everything but then its even more pixelated

loud geyser
#

It’s no video how to open an LdTk project in Unity ?

#

I got the install guide right

solemn latch
loud geyser
#

@solemn latch I seen that video

solemn latch
#

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

celest pewter
#

okay, and how do I handle that part

#

suppose I rig everything seapretly

#

now how do I animate them

potent bay
#

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?

solemn latch
celest pewter
#

I do not understand what skeletons are, but I've gotten far enough to animate them independently, treating them as different gameObjects

solemn latch
#

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.

still tendon
#

the console says Assets\Item Pickup.cs(62,14): error CS1002: ; expected

#

wh-

#

where?

hollow crown
still tendon
#

(i used the thing called chatgpt so i didnt know that much)

hollow crown
#

Yeah, we'll be banning questions using code from chatgpt soon because this is absolute nonsense

still tendon
#

and it is in 2d so yea

still tendon
#

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

valid flame
#

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

BBQ

Boss attack patterns:

  1. Vertical (2)
  2. Impare Skills or Cross(All) - if boss use impare skills here, then turn 6 will be cross(all) and vice versa.
  3. move only
  4. Zantetsuso + Summon Bomb
  5. Vertical (2)
  6. Impare Skills or Cross(All) - see turn 2
  7. Life Drain
  8. Summon Mobs + Vertical(2) then repeat from turn 2.

Tips:

  • Don't bring element...
▶ Play video
#

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

valid geyser
#

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?

valid flame
#

For creating 2d pixel art I got advised aesprite

proper zodiac
#

aseprite

proper zodiac
tiny atlas
#

can anyone tell me where i can find titled 2D map editor tutorials?

better if videos

tiny atlas
tranquil ice
tiny atlas
tranquil ice
#

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?

stuck walrus
#

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

tranquil ice
# stuck walrus

you need to put the tiles in a way that matches the grid, as it seems some of them are slightly offset

stuck walrus
tranquil ice
#

on the source image move the ones which are offset incorrectly

stuck walrus
#

ah

#

okay

#

ty

nocturne pier
#

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?

elfin sandal
#

you have to make a material

nocturne pier
#

ok I made one

#

then?

elfin sandal
#

Drag texture into albedo

nocturne pier
#

it works but the texture is gray

#

I mean inverted

nocturne pier
#

the white lines are from the camera

nocturne pier
#

ok I fixed it somehow

solemn latch
solemn latch
nocturne pier
#

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

elfin sandal
#

Have you done any tutorials?

nocturne pier
#

nope

#

I mean, I did watch the brackeys video for adding lightweight render pipeline

elfin sandal
#

oof

nocturne pier
#

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

elfin sandal
#

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

nocturne pier
#

I've been searching it up for the past hour

elfin sandal
#

Gamedev isnt easy

nocturne pier
#

bruh I know

elfin sandal
#

It should take you a long time

nocturne pier
#

that's why I'm asking here

elfin sandal
#

And im telling you you're not going to get results this way

#

Bruh

nocturne pier
#

ok thank you

thorn echo
#

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)

light cargo
#

does anyone know how to make the blocks on the scene even?

solemn latch
light cargo
modest cargo
untold steeple
#

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?

modest cargo
untold steeple
modest cargo
#

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

untold steeple
#

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

light cargo
#

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

final tulip
#

anyone know a good way to remove a background but keep things like shadows or effects in any 2D suite? Photoshop?

tranquil ice
#

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?

storm violet
#

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

stuck walrus
solemn latch
stuck walrus
#

this is another example

solemn latch
#

Yeah, that one makes me even more suspecting that the actual tilesize is much smaller

valid flame
#

if someone experienced with grids and grid placement movement please dm me I don't bite

celest pewter
#

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

solemn latch
#

Though obviously moving them apart in your image editor would be better

stark badger
#

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

short osprey
#

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?

deep gate
#

Pixel Perfect Camera crushes heart sprite

#

Need help on fixing this

elfin sandal
deep gate
#

No, It's a sprite

elfin sandal
#

is it scaled down?

deep gate
#

I think not

#

btw I am using urp but this also happened without urp

elfin sandal
# deep gate

it might be becuase you have floating point values on the position

#

pixels dont work based on real numbers very well

deep gate
#

changed position to (0, 3) still gets distorted

elfin sandal
#

what's the sprites pixels per unit

deep gate
elfin sandal
#

have you tried messing with the pixel resolution in your ppu cam settings

deep gate
#

no

#

made a thread

cedar verge
#

instead of normal

magic bobcat
#

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?

solemn latch
magic bobcat
broken sable
#

how to fix this thing

thorny laurel
#

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

modest cargo
thorny laurel
#

Okay I think that’s right I’ll test it

thorny laurel
#

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

modest cargo
thorny laurel
#

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

modest cargo
#

I see!

thorny laurel
#

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

modest cargo
thorny laurel
#

no because there is no option in graphics settings to change this after using urp

thorny laurel
elfin sandal
#

another reason not to use urp for 2d games

modest cargo
#

Right, GraphicsSettings is the BiRP way of doing things

thorny laurel
elfin sandal
#

with a 15 dollar asset

thorny laurel
#

link?

elfin sandal
#

nvm 14.50

#

usd

thorny laurel
#

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

elfin sandal
#

nice

thorny laurel
#

so you'd recommend that?

#

how much effort is it to transfer scenes over would you say

elfin sandal
#

i haven't used it, but i can't reccomend urp for 2d

#

it will limit you more than it helps

thorny laurel
#

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

elfin sandal
#

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

thorny laurel
#

hm

#

i feel like i'd break things

#

lmao

elfin sandal
#

break what

#

if you use github you can just make a branch

thorny laurel
#

you're right idk i fear everything

#

you know what ill do

thorny laurel
#

and see how ridiculous the transitions is

elfin sandal
#

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

thorny laurel
#

yeah i noticed that and kinda accepted it

elfin sandal
#

seems like everyone has lol

modest cargo
#

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

thorny laurel
#

the whole thing seemed like it wasnt meant to do what i wanted it to do

elfin sandal
#

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?

thorny laurel
#

but i think i am on some right track

#

im using this i found

#

it manually sorts the layers lmao

elfin sandal
#

might work

thorny laurel
#

it is kinda but its finnicky

#

yeah its manageable

primal aurora
#

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?

karmic stump
#

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?

solemn latch
#

Probably, but this isn't really the place to get a good answer.

vestal tusk
#

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 :

neon matrix
#

why does using a spriteatlas

#

make the tiny white lines between sprites in tilemaps

#

go away?

solemn latch
# neon matrix why does using a spriteatlas

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.

elfin veldt
#

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?

solemn latch
manic spire
#

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.

severe comet
abstract olive
#

You need to use a pixel perfect camera. Unity has a package for it.

severe comet
abstract olive
#

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).

severe comet
#

even worse!

severe comet
severe comet
#

it still happens, flickering

balmy elk
#

Have you tried packing your sprites in an atlas?

severe comet
balmy elk
#

Tilemaps can use packed sprites

upbeat edge
#

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?

untold warren
#

Can the tilemap be useful for making topdown pathfinding, or is it purely visual and collisions?

humble thorn
#

has anyone come across any sort of better implementation of the UI for tileset?