#🖼️┃2d-tools

1 messages · Page 19 of 1

modest cargo
#

I think the tile prefabs the palette generates are of different type depending on what the palette type is
May be able to select and copy and then paste from one palette to another
But if not then it probably requires a custom script to convert them

sour sage
#

Oh so even if it's 2D the isometric assets are unique huh?

modest cargo
sour sage
#

Hmm kk thx spaz

#

Got a idea , will check it out

tame wedge
#

anyone have an idea why my bone isn't influencign the sprite?

#

sprie aint skinning

tame wedge
#

ok I have found out this: its working if i make a new 2d project

#

its not workign if I make a 3d project

#

so there is probably a mismatch in the packages? is this a bug report ?

solemn latch
#

But different versions could break it.

fading magnet
#

Hello, i have a question about rule tiles in unity.

Can i get them to recognise other rule tiles as valid neighbours for blending, as shown on the 2nd image?

#

1st image is how it looks right now, and the 2nd image is how it's supposed to look. Reconstructed in aseprite

sterile osprey
modest cargo
tame wedge
# sterile osprey strange..

it should be a problem with the packages or something where the "3d" mode of unity intereferes.
any advice on how I could get help with this?

its crucial for my game which is already a year in development from the prootytpe stage.
i'm a serious fulltime dev and I want to get this fixed asap

#

froml what chatgpt is telling me right now

#

difference between package and urp version

timber mason
#

Anyone know why my game is darker in builder than editor? It's a 2d game with 0 lighting, so I'm perplexed by this

obtuse mirage
#

hello, does anyone know how can I change the grid from rectangle to square? What i did was created a new pallete, then I dragged my 2d sprite tiles into the Tile Palette window. I'm starting out with unity 2D, any help is appreciated.

lunar agate
#

hellooo does anyone know how this happens and how to undo it TT

twilit vault
twilit vault
#

not sure what else this is trying to tell me

lunar agate
#

idk why it deos that

twilit vault
#

my answer is the same

lunar agate
#

i mean i do want to draw multiple tiles but this one keeps repeating

#

i am not clicking down the mouse when im dragging them to different areas

twilit vault
#

ok, so what's the issue

#

you haven't actually said it

lunar agate
#

i have selected multiple tiles before but the dragging thing isnt what i wanted?

twilit vault
#

what's the expected behavior here exactly

lunar agate
#

like i dont want to drag it everywhere

#

just one click and done

twilit vault
#

what tool do you have selected in the tile palette

lunar agate
#

brush

twilit vault
#

are you pressing down any modifier keys?

lunar agate
lunar agate
#

nope

lunar agate
# lunar agate wait i have more context TT

sorry i realize i was really vague 😭 basically i wanna put one tile (only like the image attached to this message) in the map. but for some reason, when i click to place it, it just extends to where my mouse went (the replied message above)

#

but restarting unity did the trick though (as always). im just curious now as to why it happens

modest cargo
# lunar agate

Chances are it's Line Brush which would be visible just outside your screenshot crop
Better to show more than what you assume is necessary when demonstrating an issue

past sun
#

does anyone know how to make a overlay in unity 2d urp to make it look glitchy, like the five nights at freddys 1 main menu static effect

tame wedge
#

wth i'm even opening the samples,its not working

modest cargo
tame wedge
#

deleting project library?

#

you mean in unity hub?

twilit vault
#

no, in your OS's file explorer/finder

#

there's a folder named Library in the project root

#

a library reset is closing the project, deleting that folder, reopening the project, and letting the library rebuild

modest cargo
#

Changing editor version will also rebuild, so could be useful to start the project directly on the new version after deletion

tame wedge
#

ok 🙂 i will try it

#

is unity 6000.4 like an unstable version (hub shows its recommended)

modest cargo
#

Also, I'd only consider it safe to change the third number of the editor version on an existing project

#

Those are the patches, the first two numbers represent feature changes

tame wedge
#

ok thanks, i'll see if it works

vale garden
#

how can I make a 2D sprite glow? just want bullets to have a nice glow effect, nothing complicated

spiral ivy
#

are you already using a post processing wiht bloom

vale garden
spiral ivy
#

this would however make everything glowy, is this what you want

vale garden
spiral ivy
#

why not just do the glow effect in your 2d artwork

vale garden
spiral ivy
#

of course

#

with glow you only want some scattering right or do you mean glow such as glow in darkness

vale garden
# spiral ivy of course

I could do but 1. Would that be very customisable? 2. Would it look good?

If so I will give it a go. Otherwise is there anything better? I was thinking of using a shader graph. An yes only some scattering I think

spiral ivy
#

no it wont be customisable , you could also use shaders for that if you want more control of the glow size etc

vale garden
spiral ivy
#

are you using 2d urp?

vale garden
spiral ivy
#

so i think it should be possible to have emmisive materials then you might want to check the sprite material

#

do you have something like 2d unlit shaders you can select then emmisive

vale garden
tame wedge
#

@modest cargo you're a legend, you fixed it for me 😄

vale garden
#

I created this in the shader graph and it seems to work ok for now, would this be ok for a simple glow or will I run into issues/there is a better way of doing it? Sorry I am completely new to using shaders 😅

spiral ivy
#

if it works then it works

modest cargo
vale garden
modest cargo
vale garden
solemn latch
#

If using post processing glow, you can use hdr colors to limit the glow effect to particularly bright sprites.

marble halo
#

Is there something wrong with the script?

twilit vault
marble halo
#

When I launch the game, my character jumps about half the time.

twilit vault
#

move over there (and restate the issue)

twilit vault
foggy oracle
#

yes sorry

mild tiger
#

any apps for 2d arts and animation for beginners?

sterile osprey
#

Krita!!

#

its free, and has its own tools people have made for games: Ex. flipbook export, autocropping and exporting, tileset export, etc.
the animation tools in it are simple, and good to work with.
they recently updated their text editing tools too. it just keeps getting better

bleak arrow
#

Hi,Need help
I'm working in Unity 6000.3.9f1. - 2D project.
I've been tasked with using the sprite library asset - value .
I need to change character customization by overriding the base animation sprites.

The problem is that the game has a lot of animations, and each animation has up to 40 frames.
I have to manually drag each frame into the animation override slot. This is incredibly time-consuming and inconvenient. I tried asking AI if it's possible to write a script for the Editor that would automatically replace sprites.

It gave me several options, but they don't work. I'd like to ask people who work on this - is this even possible?

I want to replace all the sprites at once, I don't want to change them one by one, which requires too many clicks... or is the API closed, and all I can do is manually iterate through the sprites. I can't believe the developers didn't consider this inconvenience...

obtuse yarrow
#

Does anyone know how to scale this? it looks really bad

stark brook
#

hey guys, ive been banging my head against the wall trying to sort out how to effectively use sliced images as the background for ui elements (such as buttons, by using the sliced image in the image section of said button) but it hasnt gone my way. ive looked up a bunch of old and new guides on it and also checked the unity manual and unity learn section for em but no dice. currently, i have this image that i'd like to use. attached are all the other details that i think are important.
the final picture shows the issue: the test image on the left seems fine, but the image for the Play button is distorted. do you have any advice for this? theres something im misunderstanding but i dont know what. nothing changes if i swap between Sliced and Tiled image type on the objects

#

ive noticed that updating the pixels per unit to, say, 1080, fixes the play button, but then destroys the test image

#

i was hoping to be able to have a uniform thickness border for all ui elements that use this image

#

please ping me if you have any ideas! thank you if you so much as read it

marsh hound
#

@stark brook shows us settings for button and test. You haven't accidentally changed pixel ration (don't remember real name of it)

stark brook
#

"UIBackground" here is just "Button BG(2)" renamed

#

i was able to get it sorted out by setting the pixels per unit of the texture to 1080 and then manually adjusting the pixels per unit multiplier of each ui element to make the outlines all look the same, but i feel like there's probbaly a better way to do this

#

eg, 1 vs 0.25 pixels per unit multiplier on the grey box behind the buttons

#

ive been working on this since first asking so some things look different between pics, sorry

modest cargo
#

Rect transforms are also more complex than typical transforms is that they have the scalings in addition to their rect dimensions

#

Width and height dimensions are used to change the size of the rectangle without affecting its graphical proportions in the case of tiled and 9-sliced images
Scale does change its proportions, so if you scale a UI graphic or any of its parent hierarchy up to make it the "right size" you've also changed the proportional size of the rounded corners and such

#

On top of those the sprite asset has a PPU value, and on top of that the Image component has the PPU multiplier property

#

So that's at least 4 variables that affect the same thing or nearly the same thing
It can be easy to end up scaling a rect transform one way and then modifying another variable like PPU the other way to compensate
When actually it wasn't necessary to begin with
Or so I understand anyway, I don't work with UI much
Not sure if width and height are inherited or how they are
#📲┃ui-ux is the better place to ask, this channel is for sprites specifically

stark brook
#

i guess i misunderstood the channel haha thanks
i'll see what i can do with the info you provided, my buttons in fact were scaled instead of resized whereas the background was resized without being scaled so maybe that's where my issues are coming from
thanks so much!

modest cargo
#

@daring flame I would first ask what you mean by "not viewable"

#

What do you see when you try to either open the prefab, or to add it into your scene

daring flame
#

this is what it looks like, the sprite chunk. its empty both in the game scene and the preview in project. i assume something messed it up like the transform position scale etc, im not entirely sure

modest cargo
daring flame
#

its just suppposed to have a basicmap

#

I think the heirarchy is fine though

modest cargo
#

Try clicking this in your scene window

daring flame
#

alright ill try

#

doesnt appear to help

modest cargo
#

Additionally if objects become invsible it can help to select the gameobject and doubleclick it in hierarchy, or press F with cursor over scene
This focuses the scene viewport on them, making sure they're not outside the clipping planes

daring flame
#

i see

#

maybe ill just try troubleshooting some more

modest cargo
#

Try to crop your screenshots less when showing things, there may be other clues hiding outside

daring flame
#

alright thanks, appreaciate the help

modest cargo
#

In the first screenshot there was a glimpse of a grassy tilemap, was that the same tilemap as your prefab?

daring flame
#

no not the same

modest cargo
#

It's a possibility that if you've edited the prefab in another scene, the changes have not been applied to affect the prefab asset

#

Not sure what else the problem could be
I'd try to select one of the gameobjects that should have a renderer component, and make sure they have one and that it's enabled
Otherwise won't be much there to see

daring flame
#

alright, ill try that, thanks

modest cargo
#

The wireframe shading modes next to the one I suggested clicking could also help
They can show if there's geometry there even if it's fully transparent for some reason

daring flame
#

cool, will check that too

novel wraith
#

I have a problem with understanding what or why this is happening for non 1:1 square sprites

if i create a palette and add texture that has all the sprites
everything works as expected

if i create a palette and add a rule tile that uses the very same sprites
it has this weird offset that im not expecting it to,
i think it tries to find the first pixel to have an alpha and drag the whole sprite all the way to the top of 1:2 container?

is it even possible to paint non square tiles via rule tile without creating a separate texture?

stone nimbus
#

am i doing something wrong cause i am trying to draw somethin gin tile palette 2D but the tiles are not appearing am I doing something wrong

prisma crow
#

Why when i click "Create New Tile Palette, it opens a window then closes it? i was barely able to get a screenshot because of how fast it closes

twilit vault
#

check if you maybe have eg escape stuck, on your keyboard?

#

that's the only idea i have

prisma crow
#

no it's nothing like that

lean estuary
#

This creates an asset. Make sure your application has write permissions. Maybe restart and make sure it's not in a system, folder.

#

@prisma crow Also remove transphobic meme from pronouns field.

prisma crow
lean estuary
#

!kick 276431447408246786 If you return with transphobic meme in you profile you will be banned.

#

suit yourself

dapper rainBOT
night plover
#

Guys why does my 2d pixel art character spritesheet look bad in the unity project window? I have filter mode set to point no filter, compression set to none, and ppu set to 32x32 for the spritesheet, and it still looks WAY over pixelated, whereas i have done this before and it looks fine

lean estuary
#

You should illustrate what's wrong.

#

@night plover And remove duplicate cross-posts

cobalt basalt
#

Hello

#

Hello I need help with making my isometric tile palette fit in its diamond shape
Im not sure why it does this ive been stuck on this for a while, i've followed official docs and i just cant seem to get itright
Im thinking maybe its caused by the actual sprite img sizes?

modest cargo
# cobalt basalt Hello I need help with making my isometric tile palette fit in its diamond shape...

Kind of
The sprite's PPU must be set to a value that matches the resolution of your sprite to the grid unit
And also your grid cell ratio must match the width/height of your sprite tile
There's an official guide that goes over this: https://unity.com/blog/engine-platform/isometric-2d-environments-with-tilemap

Unity

Unity's Isometric Tilemap system allows game creators to customize and iterate detailed 2D-level designs with hexagonal grid layouts, brush tools, and more!

#

I recommend keeping either the grid cell width or height as exactly one unit, so measuring distances and calculating correct PPU does not become difficult

#

For example 1 by 1.3 grid is much easier to work with than a 1.2 by 1.56 grid, even if they have the exact same ratio

plush lance
#

Hello. Im making a 2D game and I want to create procedural objects composed of similar sprite segments that repeat and align seamlessly in a specific 1D shape (lines, curves, etc.) . The segments should also "bend" in order to accomodate the shape if it isnt straight. i hope the image explains it well.

Im not quite sure how to do this without creating a bunch of game objects for each segment, and I was wondering if anyone has a suggestion for a more elegant approach?

modest cargo
tidal pine
#

Hi. Anyone tried making levels using cohesive 3D asset packs (like Synty) and render it as 2D (Unity 6.3's new feature)? Are you getting good results?

modest cargo
tidal pine
# modest cargo What do you refer to by new feature to render as 2D?

In this talk, you will learn about the new advancements in 2D in Unity 6.3 and beyond. We'll demonstrate our new integrated workflow for mixing 3D into your 2D projects. We will walk you through the new 2D sample and we'll explore new features, including modern 2D Physics APIs, the Sprite Atlas analysis tool, a tour of the performance improvemen...

▶ Play video
modest cargo
# tidal pine https://youtu.be/SdrMgxChrRQ?t=270&si=f0S_R6bNqCoXR7Vp

Ah yes, that doesn't practically change how your assets are rendered but removes annoying limitations there were if you ever wanted to use 3D models at all in the 2D renderer
That's why most games that mix the two used the 3D renderer and lived with not having 2D exclusive features instead, mainly sprite lighting

#

It's such a new change that really the only example that likely exists is the demo scene shown in the video

#

If you're making levels, for you it means you can use 2D sorting with meshes so they respect sorting layers
I believe that makes them compatible with isometric tile sorting as well

swift knot
#

Ah Unity, you sweet little thing. You and your memory corruption and tiles/sprite assets randomly becoming something completely different.

marsh hound
swift knot
# marsh hound Did you reset meta data for asset?

Found out it is do to fun times with Sprite Atlas in Editor after updating to Unity 6.5.
Just trying to figure out why sprites from a different atlas for mixing together in tile palette view.

This is just a test project I use for testing out new versions without worrying about things breaking.

marsh hound
#

Maybe new atlas will fix it?

#

Incorrect coordinates for sprite

swift knot
#

It got worse lol. Way worse. Will wait and see if it is related to a bug fix coming out in Unity 6.5 beta 4.
Got three confirmed bug reports related to sprites and tile maps already confirmed by Unity.

Going to see if any of them fixes it when the bug fixes comes out.

#

Also really can't do much testing when it causes a hard crash that shuts the engine down every few minutes.

plush garden
#

Hey, How will you slice this in sprite editor?
16x16? 8x8? automatic? I am not sure how to appraoch this.

twilit vault
#

guessing it's just a single row of frames, spaced evenly?

#

you'd probably use slicing by cell count for this

#

generally you don't need autoslicing for spritesheets, it'll mess up the pivot spacing

plush garden
#

yeah, that works! thank you

spring idol
#

auto-slicing is fraught with peril, yeah

queen osprey
#

how do i make it so sprites pixels rotate with it?

twilit vault
#

they should already do that?

#

unless you're using pixel-perfect or something

queen osprey
modest cargo
queen osprey
modest cargo
modest cargo
#

Which could be easily confirmed if the window this screenshot was taken from could be seen in the screenshot

queen osprey
#

Ots the rectangle falling

modest cargo
#

If the game window has a zoom (or "scale" I think) which is not a whole number, the rendered pixels will stretch or squash

queen osprey
#

Its the fact the lines not straight

#

The pixels don't rotate with it

modest cargo
#

Or something else

queen osprey
#

Yes it should be a single line

#

Idk how maje it that tho

#

Its a screenshot of it falling btw

#

Its not a frozen sprite

#

When its upright its straight

#

It just looks low quality when the pixels can just change

modest cargo
queen osprey
#

I mean a single solid line like this | which doesn't turn into zigzags while rotating

#

See this emojie 👑 if it rotates it should stay the same

modest cargo
#

We are seeing two different types of zigzags which my two images attempt to demonstrate

queen osprey
#

When its upright the sides a single line no zigzags how do I maje it so while falling it doesn't gave the lines turn to zigzags?

modest cargo
#

First you should set your Game window to 1x scale

queen osprey
#

And what does that do and how?

#

Pixel

green goblet
#

can anyone help with this problem. as you can see in the video the player head gets inserted into the tree. is there any work around?

shy anvil
# green goblet can anyone help with this problem. as you can see in the video the player head g...

Sprite Sort Point

By default, a Sprite’s Sort Point is set to its Center, and Unity measures the distance between the camera’s Transform position and the Center of the Sprite to determine their render order during sorting. An alternate option is to set a Sprite’s Sort Point to its Pivot position in World Space. Select the Pivot option in the Sprite’s Sprite Renderer property settings and edit the Sprite’s Pivot position in the Sprite Editor tab of the Sprite Editor window.
For consistency, it is often best to place the sorting point at the bottom of each sprite which is often a good point to sort based on since that is the point where the sprite would hit the ground in this camera perspective. If the Z position doesn't change when the objects move up in the screen, you also probably want to use Custom Axis sort mode to sort based on their height on screen

modest cargo
# green goblet can anyone help with this problem. as you can see in the video the player head g...

Related to what AleksiH pointed above, you likely want to use sprite sorting techniques of isometric perspective
In a nutshell that means sprites should have their pivot point placed at where they visually make contact with the "ground", like between a character's feet
With objects made of multiple sprites you should use Sorting Group component so the head and other limbs don't all have to have their pivot set just for sorting

#

Then using a vertical custom sort axis will make everything sort like we intuitively would expect

#

Large objects with many ground contact points, like fences with turns will be difficult to do with just one sorting pivot though

dense cosmos
#

hey guys wsp? i've got a very specific problem, i have all the separate sprites/frames of an animation in pngs, and i need them in such a way that the animation would look good if played one after the other, however, even though the original animation looked fine, now that i've got them as separate pngs they're all a couple pixels wider/thinner/taller/shorter so, does anyone know how could i make them all the same dimensions in a decently practical way (since ill have to do this a lot)

twilit vault
#

why are they different sizes?

#

why are they separate pngs?

dense cosmos
twilit vault
#

the practical way would probably be to fix your workflow so this doesn't happen

dense cosmos
twilit vault
dense cosmos
#

so like a separate program needs them like that

twilit vault
#

or what exactly, that's all google gave me lmao

dense cosmos
#

so theres like a whole program some guy made

#

and to make ur own u js plug the pngs and maybe change a couple variables

twilit vault
#

and the pngs need to be different sizes for that? that doesn't sound right

#

are these separate layers?

dense cosmos
#

nono they need to all be the same size

twilit vault
#

ok so why are they different sizes lmao

dense cosmos
#

but when i got the pngs i got them as different sizes for some reason

twilit vault
#

where did you get these pngs

dense cosmos
#

well i ripped them from a game

#

like, legal and stuff yk

#

fair use all that, also i do have the game

twilit vault
#

welp ok yeah can't help with this then

dense cosmos
#

nah fr?

twilit vault
#

it's not just the legal reasons, there's a practical reason - modding or ripping stuff introduces weird constraints like this that you wouldn't normally encounter

dense cosmos
#

im not rlly modding or decompiling

twilit vault
#

i would guess they're different sizes because they were compressed into an atlas or something like that

twilit vault
#

so the weird constraint in question is that you had source images that were nice to work with, that were turned into a format that's better for some computer constraint, and how you need to turn them back into a form that's nice to work with

#

if you have the atlas map as json or something you can use that to regenerate the source images

dense cosmos
#

yup, but the animations/gif exist so there must be a way right?

twilit vault
#

but outside of that, i think that's solidly outside the scope of what we can help with

dense cosmos
modest cargo
#

Ripping has the same weird issues as modding and decompiling
You'll have to align the sprites on their images before importing using an image editor
Or in other words

fix your workflow so this doesn't happen

twilit vault
#

it's not that i don't want to help, but i don't think it's practically feasible here

#

it's a different context to work in

dense cosmos
modest cargo
#

Likely yes
If they're unaligned to start with

twilit vault
#

if you have more info (such as the atlas map), then you could maybe do it programmatically. you just need to adjust them in some way

dense cosmos
dense cosmos
modest cargo
#

One big image where the sprite frames exist together, in a regular grid or accompanied by a file that specifies where each sprite begins and ends

twilit vault
#

is that accomanying file called a map actually

#

i mightve just taken that term from code transpiling lmao

dense cosmos
#

would make sense for it to be called a map ig

modest cargo
dense cosmos
#

btw i tried something abt this some time ago and i js noticed ihave a bunch of fbx files too, i dont really remember why i got them but maybe theyre important?

#

theyre in an "animator" folder

modest cargo
#

We don't know the application you're making content for
And we don't want to speculate the shape or form the ripped assets are in

dense cosmos
#

i guess thats fair enough

#

i mean im pretty sure it cant be illegal since theres no pirating going on and no ones making any money

#

so alr ima go try some stuff ig

#

ty tho

modest cargo
# dense cosmos ty tho

What also makes modders difficult to help is that they generally don't know the typical development workflows
Like how sprite sheets or atlases are worked with
Learning that from the game dev perspective may be the most effective way to improve at this

dense cosmos
gusty oak
#

Guys how to resize a sprite for a top down square tilemap? Idk why when i drag the sprite in the palette and select it, the sprite is smaller than the squares on the tilemap. I want the sprite size to be the same as the square size

twilit vault
gusty oak
twilit vault
#

how many pixels should be in a given unity unit?

#

ie how big (in pixels) have you made a given tile

gusty oak
#

Guys how to DEFINITELY delete a tile in my tilemap palette? Of course im talking about 2d. Idk why I have a pink square on my palette, i tried to delete the sprite.

twilit vault
#

eraser tool in the palette?

#

iirc there's a button to operate on the palette

gusty oak
#

Ok i'll try

gaunt leaf
#

Hi!

I've made this rig for my 2D character. I need the shirts to be swappable. They all have the same shape.

How can I achieve this? I will need like 50 shirts total, so I don't want to weight paint every one. Do I make the shirts in the same file, or do I just have them as individual pngs? What is fastest?

Thanks in advance!

sterile osprey
#

@gaunt leaf when done with rigging and weight painting, press 'copy rig' you can import your other model, then 'paste' and enable copy mesh, copy bones, and it should copy everything over if they are the same shape, and name

Am not familiar with how to do it with Only the shirt, an alternative I can think of is putting all the shirts on the same file, and in editor disabling the sprite renderer or game object for all shirts except the one you want visible. You should be able to copy and paste if you select one shirt, and select the other. though i havent tested this..

modest cargo
solemn latch
#

I'd just swap the texture.

gaunt leaf
#

When I paste the rig from the template shirt, it looks like this. Is there a way to make it center itself? Or do I have to make my png have the same dimensions as my template character (meaning lots of empty space with the t shirt in the same location as in the template character)?

#

Even if I do that, it looks weird. I just can't get it pasted correctly

maiden sapphire
#

does anyone know why the child (white square) needs an offset of -0.08 (check transform) to be perfectly sligned with the parent? (box with an arrow)?

twilit vault
magic narwhal
#

in unity we can change these flowers and trees etc. size right?

modest cargo
magic narwhal
#

ty

green goblet
#

can any one help? i tried to use auto tiling but for some reason, the top most, right and left most fences is kind of weird looking. did i do the rulr tile conditions wrong?

twilit vault
green goblet
#

if i send you the fence sprites, can you do it and send me the picture in dm?

twilit vault
#

no

#

this isn't a place to get people to do work for you

#

is the fix here not just clicking twice in the tiles i mentioned

#

and if you delegate to dms, noone else can actually verify it was done correctly

green goblet
#

then can you send me an example with any random sprite?

twilit vault
#

no

green goblet
#

i tried rule tile for first time

twilit vault
#

i literally don't have any resources for this, i don't know how to use ruletile

#

i mentioned this in my first message

gaunt leaf
twilit vault
green goblet
#

ok, lemme try then...

twilit vault
#

reading comprehension is kind of an important part of receiving help, man

green goblet
#

where is the comprehension?

twilit vault
#

nowhere here, apparently...

green goblet
#

is there literally anyone who has video/ text teaching rule tiles for top down 2d in details 😭

#

i couldnt find in youtube

gaunt leaf
#

This should fix it

green goblet
#

ok, it fixed left fence and right fence issue but the top fence is still showing error

gaunt leaf
#

Make sure this one looks like this too

#

number 2 in the list

green goblet
#

it made it worse

#

now the bottom fence is weird

gaunt leaf
green goblet
#

too

gaunt leaf
#

That's my bad

#

It shouldnt have the top one

green goblet
#

still not. bottom tile is still ok but the top is still wonky

gaunt leaf
#

That's a different issue. Remove from the top one

green goblet
#

YAAAY ITS FIXED

#

Arigato Gozaimasu

desert dock
#

Does anybody have any tips for a cool tilemap-shadow system- the problem with the tilemap shadow caster system is that it doesnt work for me as my tilemap is generated during runtime. i dont even need anything special or komplex. i just want some dark slightly transparent sprites mirrored on the map so it looks like shadow or anything like that. Are there any solutions to this issue?

modest cargo
desert dock
#

by that i mean just like the sprite itself slightly rotated and black transparent, so it looks like a shadow

#

thats what i would do if there is no other "real" solution

#

just taking the sprite onto another tilemap with the color black and slightly transparent and rotate and maybe also scale it a bit so it looks like a shadow but i have a feeling there are better solutions

modest cargo
frail chasm
#

Why cant I add a png/texture to this material??

modest cargo
desert dock
#

my question is if there are any solutions to this?

modest cargo
modest cargo
#

@desert dock As far as I can tell shadow caster 2D does work on runtime-modified tilemaps, but only with Composite Operation: None

wild oriole
#

Anyone use Affinity for drawing 2d art? Having a hard time finding a tilesheet tutorial for affinity?

cedar beacon
#

I would just draw the individual tiles then use some other tool to put them all in a tilemap

iron locust
#

Hi everyone, it's my first time participating in a game jam, and I'm not that experienced in Unity.
Is it possible in Unity 6.3 (Universal 2D), to use both 2D lights and the regular 3D lights at the same time? and if so, how?

cedar beacon
#

So you can't use both light types on the same object

modest cargo
#

@iron locust @cedar beacon I think not, unless that's some new thing?
2D lights require the 2D renderer which removes all shader functions even tangentially related to 3D lighting
However 6.3. 2D renderer now has Mesh2D-Lit shaders which allow 3D meshes to be lit by 2D lights
And inversely in the Universal renderer sprites can be assigned 3D lit shaders, but it's a hack and doesn't work perfectly

cedar beacon
modest cargo
#

Or maybe make a custom renderer feature that swaps renderer during rendering itself, or something

vernal flint
#

Actually, maybe I should ask this here:
I have an art style with a non-symmetrical isometric grid, with this sort of tilt. I don't think it's possible to get Grid and TilemapRenderer to work with it?

vernal flint
#

My current workaround is to only use the tilemap to determine what sprite is needed in the tile rules, but to then manually place a sprite in the world at the actual coordinates. I can then disable the tilemap renderer.
(grey is the tilemap, for reference)

modest cargo
#

Very finicky though, even if the right rotation and scaling could be determined with some maths I'm not sure if it will ensure there's no pixel drifting due to subtle inaccuracies

#

And pixel perfect camera component won't deal with this kind of rotation at all

#

I guess the other option would be a vertex shader that overrides the transformation matrix of the tilemap to billboard every tile towards camera so you're free to rotate and scale the grid they're on, but I'm not sure how difficult the tilemap renderer will make that

heavy yew
#

since the URP channel is archived, I'm not sure if this is the right place to ask, but I'm trying to add an outline around a character with univeral render pipeling. The out and the main preview looks correct, but then you go to the actual game and she looks irradiated. I disabled bloom, but it still looks really weird, and I'm not sure why this is happening and not sure what I should do to troubleshoot here since im newer to shader stuff. Any advice? Changing it to lit vs unlit also makes no difference.

turning the universal light intensity to 0 also makes it look super washed out.

#

also when two objects of the same material cross over like this, this happens, which may like give more insight?

#

If my scene is set to light overlap, things are fine in scene view, but still crazy wonky in game mode. Also, if scene lighting is on, it looks like this, so probably it's a problem with that?

heavy yew
#

ah ok, thank you!

queen vapor
#

hi, i have a problem with deciding what order in layer an object should have. I have like 2.5D style walls, right now i tried to set the order in layer based on the center point/lowest point in the GO - the idea was the lower the point the higher the order, but it doesnt work and i have no ideas as to how to render it right

solemn latch
modest cargo
#

Specifically a sort axis tilted along the forward face direction of the wall

vernal flint
# modest cargo I think there's no chance of turning an isometric grid intro a dimetric or trime...

I greatly appreciate the research you did. I think the effort (to make it work with the tilemap) might not be worth it, given this is just to make the tool/editor side of server map creation easier, and I won't need to make too many server maps. Most will be simple, like the hacking puzzle graphs in Deus Ex: Human Revolution.
Thanks again though, it really helped me narrow down my options before I made that decision.

queen vapor
#

TMP disappears after i tried to make all my UI sprites on sorting layer UI

modest cargo
wooden token
#

hi

atomic ether
#

Hey guys my game was working fine so far however i changed my player sprite to bottom center for pivot on each sprite, and it works for objects still or anything that spliced up right around the entire object, but for some reason, the bounding blocks tile map it doesnt let me to the short anymore as you can see in image 2 i use composite collider with the tilemap collider it was working flawelessy but not my character gets stuck at the orange where its spliced by 16x16 instead of at the collider. any help would be appreciated

#

hm realized i broke it somewhere even before changing the pivot

modest cargo
atomic ether
#

been sitting here for hours, any ideas on how i can fix it would be greatly apprecaited im literally trying everything even back stepping

#

I might have found it give me a sec

modest cargo
atomic ether
#

damn it bro

#

u found it in seconds

#

there is a second tile map that i accidentally cover overed with

#

that had the colliders

#

what a joke

#

goodness thank you

#

its solved

#

so mad at myself

#

5 hours

#

didnt know it was to thick couldnt tell another tile map was covering it

modest cargo
atomic ether
#

noted.

#

thank you

#

I will start to look for overlapping issues from here out

buoyant olive
#

I can't find a clear answer online. Is there a way to place a 'prefab' of tiles? I have this "machine" that's made up of multiple tiles and I want to be able to allow the user to place it at runtime (NOT EDITOR). How can I do this easily? There's tilemap.SetTiles/SetTilesBlock but that would require me to manually fill out an array of tiles which would get time consuming especially as the amount of stuff I want to place increases.

modest cargo
# buoyant olive I can't find a clear answer online. Is there a way to place a 'prefab' of tiles?...

Tilemap Editor already has this kind of functionality as it allows selecting multiple tiles from a palette to paint with as a brush
No idea how easy or hard it is to use it or its code at runtime, could be either
If you'd be doing it with your own code, consider that the tilemap component on prefab already is an array of the tiles you need, so reading that information and writing it to another tilemap probably isn't too technical

swift knot
# buoyant olive I can't find a clear answer online. Is there a way to place a 'prefab' of tiles?...

Depending on what version of Unity you are using there might be a solution that involves saving a set of tiles inside of the editor into some type of data asset like a scriptable object.

During runtime you can take that tile data and place it on a Tilemap grid anyway you want.

Note this API is Unity 6.4+, but there are ways to do it with older Unity versions.
Using something like a TileArray (again 6.4+, but can make your own version) you can place sprites in the editor like you want.
Serialize that data in a TileArray which keeps track of the TileData in something like a ScriptableObjects and have at Runtime let players select somehow the TileArray they are placing down. Get the TileData which includes the tile positions and just add the to those tile positions the position that is the center where you want to place the object.

https://docs.unity3d.com/6000.4/Documentation/ScriptReference/Tilemaps.Tilemap.TileArray.html

mighty violet
#

Why do my tile spite objects not sort properly I used the automatic slicing the pivot is bottom center for all of them they are on the same sprite sheet and same tilemap should i just turn them into gameobjects has anyone ran into this?

orchid aurora
#

is there a way to add a sprite mask that moves with a bone? i genuinely cannot find an answer online

marsh hound
marsh hound
modest cargo
#

There are many kinds of tilemap sorting alone, some for isometric perspectives, some not, some for isometric with depth

cobalt basalt
#

What is the correct way of handling boundaries

#

I tried playing with the 2D box collider but it seems like theres something else to use. Because my character will just go up, void or not until it reaches the green collider

#

My bad, I used a polygon collider instead

modest cargo
tribal compass
#

Are there any guides on pixel perfect snapping at all? Can't find anything. The documentation on 2D Pixel Perfect is limited too

#

I want to be able to snap my assets by pixel in the scene.

twilit vault
#

ah you did answer my clarifying question, i didn't notice, mb

#

anyways yeah it's in the scene options

#

you can modify the grid size to be 1/ppu

tribal compass
#

yeah I've seen that, not sure where though I'm very new to unity

#

would that be here?

cold pelican
#

don't know if you caught it before leaving the other room rami.. Fogsight mentioned checking the pinned messages here

twilit vault
tribal compass
twilit vault
#

so eg for 16 ppu, you'd set it to 0.0625

tribal compass
#

How do I scale the Pixel Perfect camera? Doesn't seem to have an option for that

twilit vault
tribal compass
twilit vault
tribal compass
#

cant interact with the camera at all while i have the pixel perfect component

#

oh nvm its the assets pixels per unit

modest cargo
# tribal compass oh nvm its the assets pixels per unit

Not quite
Pixels Per Unit value of your assets determines how many sprite pixels you want to fit in one unit of space, which at that point is unrelated of camera size
Asset Pixels Per Unit tells the Pixel Perfect Camera component what PPU value you use for your sprites, so if you change that you should also be changing the sprite PPUs to match which would effectively counteract the change
The variable you should be changing is the Reference Resolution
With PPU and Asset PPU values matching, Reference Resolution informs the component basically what "retro" resolution you intend to upscale to the user's high resolution screen
How it does the upscaling depends on Crop Frame setting, and it only allows the upscaling if it would result in an integer Pixel Ratio

#

So no fractional pixels on screen, as that'd not be "pixel perfect"

#

Cinemachine Pixel Perfect Extension has an additional camera scaling method
While Pixel Perfect Camera component's job is to calculate the camera size, if the CM camera size is additionally changed, it'll attempt to snap to next larger/smaller camera size that also results in an integer pixel ratio

#

But in my experience it may be buggy at least if no grid snapping or upscale RT is used

tribal compass
#

Thank you so much for that wonderful detailed explanation

inner needle
#

i'm trying to use the built - in game object brush, but each time when i try increasing the cell amount it 1 - doesn't change the cell amount and 2 - resets the first cell to default
any idea how to fix/use this?

spiral holly
#

Hello, I recently started using Unity and I have an issue where my Tile Palette is black. Could someone help me?

celest wind
#

Anyone know whats going on with the auto-geometry of my sprite in the skinning editor? I see a bunch of examples from others where it just "works" and all islands are separated cleanly. Is it because it's 64x64? Something else? Should I just go in by hand and fix it all?

#

Or is it just that the parts are simply too close together and I need to rework separation areas?

modest cargo
sterile osprey
# celest wind

Each part is its own sprite/layer in the psb. yours seems to be one spite merged together which will make rigging difficult

#

also check the compression settings on your sprite

solemn latch
#

You can mess with the auto geometry settings, lowering the alpha threshold and increasing the detail, but for such a simple object just manually building geometry is probably easier.

mystic patio
#

when i upload my tileset to the tile pallete tool it shows it as black

#

please help im desperate

lean estuary
# mystic patio when i upload my tileset to the tile pallete tool it shows it as black

Tiles should work as normal, just preview in Tilemap Palette shows them black, it's fixed in the next version that's not out yet, apparently. https://issuetracker.unity3d.com/issues/tile-appears-black-in-the-tile-palette-window

#

You could roll back to 6000.4.5f1 as well, it was fine there.

indigo star
#

For tilemaps, is there a system for transferring regions or rooms and such between tilemaps? For example if I wanted to have procedurally generated forest with a manually created grove placed within it, how would someone go about this?

I'd like to have a mix of procedural and manually created areas. I can do the procedural generation, but I'm unsure of how to make, store and merge the manually created areas.

solemn latch
tame wedge
#

anyone know how to reorder the drawing order of a skinned SINGLE sprite?

#

i feel like because the bones are lower in the order the thing it is skinned to gets drawn in that order

#

i want the pants to be behind the torso, and the head in front layer

#

also, if anyone could explain how to properly make similar rig from multiple sprites cut from one image? i have no idea how to connect the arm rig to the body rig if they are all seperate

#

like, this is the setup

#

how would I go about splitting this, but keeping the skeleton intact?

tame wedge
#

found the fix myself, appearantly the visibility menu is super hidden, and the depth is what i needed

modest cargo
green goblet
#

i need a massive help. can anyone teach me how to make trees ? i have stump and "tree top (with trunk)" sprites. i want the trees to have felling down effect after cutting in a way that the stump stays at same place and can be cut down further to be destroyed. also can you teach me how to add visual shaking and rustling visual and sound effect? i have the tree sprites set at correct pivot and sound effects ready. i set the game to be pixelated top down rpg. i am tired searching it in unity docs because the 2d guides are really scattered. i would be really grateful

stiff crag
#

There is like an invisible wall, I think it is a box collider but I turned on gizmos and nothing is there, anyone know how to delete it?

#

if theres any details needed lmk

twilit vault
#

don't colliders only show when selected? try selecting all gameobjects and see if there's a collider there

#

could also check in OnCollisionStay and see if it's reporting collisions with anything

stark pine
#

Hey guys! Anyone else having this problem?
I'm using the most recent editor (6.4 (6000.4.6f1)), and, well, my tiles look black on the Tile Palette screen, but they look just fine in the Scene, anyone knows how to solve it?

fervent zinc
upbeat moss
#

guys I just pressed 2 in the 2d editor wtf (its my first time using 2d)

twilit vault
#

what do you mean by "2d editor"
just, the scene in 2d mode?

modest cargo
dull quartz
#

!collab

dapper rainBOT
# dull quartz !collab

:loudspeaker: Collaborating and Job Posting

We do not accept job or collab posts on Discord.
Please, use Discussions to promote yourself as job-seeking, advertise commercial job offers, or look for non-commercial projects to participate in:
• ** Collaboration & Jobs**

inner needle
#

@lean estuary if i get what you mean by edit mode, it still doesn't work

#

is this edit mode?

twilit vault
#

isn't there a button labelled edit mode

#

pretty sure what you captured there is the pen tool

inner needle
#

"toggles tiles pallete edit"

twilit vault
#

that's it then yeah

#

i remembered there being another button in a different location with the same or a similar logo

peak trout
#

I’m new to you Unity with trying in for a 2d character, but having some trouble, can somebody guide me how to do it

peak trout
twilit vault
languid ravine
#

what app do you use to create 2D characters?

languid ravine
shy anvil
shy anvil
#

There are a lot of different styles for 2d characters (pixel art, vector graphics, art styles, etc.), I wouldn't know much about that anyways but being more specific with the question could help generate useful answers. This is also server specific to what Unity offers so the question might be bit off-topic anyway but I guess someone might have some suggestions

sterile osprey
solemn latch
languid ravine
languid ravine
sterile osprey
#

a lot of people use aseprite

languid ravine
sterile osprey
#

can also use krita, but am no pixel artist-- have no idea how usable it is. probably missing a lot of features

#

also please dont ping me for every reply

languid ravine
#

alr thx and sorry

twilit vault
#

krita is viable afaik, and piskel also exists

modest cargo
#

Libresprite is a free fork of Aseprite
Maintained separately but skips the hurdle of compiling

languid ravine
#

so if i get it

#

i can use libreasperite instead of asperite itself?

languid ravine
twilit vault
#

there's a guide on their github

languid ravine
#

can u send me the link?

shy anvil
modest cargo
#

If you really want to compile it you'll need to be prepared to spend considerably more effort than that

languid ravine
gaunt leaf
#

Hi!

I am getting into secondary textures, and I'm wondering why normal map lighting doesn't get applied to my sprite shape fill

modest cargo
modest cargo
languid ravine
#

the thing is that i'm a complete begginer and i started learning this week

#

and idk where to start from as an indie developper

languid ravine
#

alr thx for helping

low shadow
#

Hey

solemn latch
solemn latch
#

Hazard of my current schedule, alas.

languid ravine
modest cargo
languid ravine
sacred eagle
#

hello. Do u guys know any free tool to create isometric tiles? ideally something where u load a texture per face (3 total) and it creates the tile

woven egret
languid ravine
woven egret
#

This is a pretty commonly used free one

sacred eagle
#

i have an issue

#

i cant place that tile above it for like a height map. Also, even if i could, they height wont correspond to the apropiate tile. How can i do it?

#

do i need specific tiles of different heights?

#

oh, i can change offset

woven egret
#

in your tile pallete set the scene view z position to be 1 or 2

cyan kiln
#

2D PEOPLE

#

what the hell is this

dull quartz
cyan kiln
#

i have no idea

#

the pixels are weird

#

ok ok when i move him he squishes and pixels shift

#

idk how else to explain it

#

ok we did somthing im sorry for disturbing the masses

west spade
#

Hi! I'm quite puzzled by a problem.

I worked with the Tilemap and Tile Palette tools two years ago, it worked fine. I've tried again today and it just doesn't work at all.

I've followed a tutorial on the side to refresh my memory. But basically:

  1. Imported my spritesheet.
  2. Created a Tile Palette. Dragged my sprites, created the Tiles.
  3. Created a Tilemap (with a parent Grid) in my scene.

So far, everything seems to be OK. But I get really bizarre behavior when it comes time to actually paint. If I select a tile in my Palette, I see nothing in my scene. No grid, nothing. I've tried selecting the Grid object, the Tilemap object. I tried resetting Unity. I've ugpraded version. But basically, the Editor becomes super slow, I can't play, and sometimes I get a loading that says that it's reloading "SceneView.Repaint" or something.

I'm wondering if it's an editor bug, or I've done something really wrong. I haven't really toyed with any settings except setting my Pixel per Unit for my sprites, selecting Hexagons, and such.

#

Not that it tells you much. But this is what I see. My tile is selected in the palette, I'm in Brush mode. But there's nothing in my scene view on the left. And as soon as I open the Palette and select my Tile, the editor becomes quite laggy. If I close the Tile Palette, everything goes back to normal.

west spade
#

OK, I found my problem. It's kinda dumb. Because I had an empty scene, I had very little reference as to where I was, and how "zoomed in or zoomed out" I was. By trying to fix my problem, and trying to paint, I've actually painted some tiles really, really far away. So I had this huge tilemap that required to be incredibly zoomed out, and I think that moving my mouse in my scene triggered thousands of preview for each little movement. Pressing F to focus my Tilemap would dezoom me incredibly far.

I've recreated a Tilemap, used my Camera as a reference, pressed F and then painting works normally.

modest cargo
west spade
#

While I'm here. Where does the data from Tilemaps lie? I haven't created anything in the project that would the data. Is it contained in the GameObject itself?

modest cargo
#

I don't know how exactly components contain unique data like that though

west spade
#

Interesting. I'll access it by script then.

solemn latch
cyan kiln
#

its a hat :(

solemn latch
#

Both have their benefits and downsides.

cyan kiln
#

Thank you :)

cold badger
#

is it possible to get the player to walk though the sides of a platform effector. at all

#

im using a tilemap colldier rn

#

and i want th eplayer to be able to walk though the highlighted chunk but also be able to jump atop it

#

or should i just manually assigh colliders

twilit vault
#

i feel like a platform effector would need to be separate from the main tilemap collider

#

i guess make sure you're using a composite collider, perhaps check if your tilemap is generating edges or polygons?

echo rover
#

I'm not really sure where to drop this message.. since my issue is a mix of 2D with 3D but I'll try it here xD

in a 3D project I'm using a Orthographic camera and there will be no rotation whatsoever, I will see the world in a "2D way" although it's actually a 3D game

I'm using:
Y plane for the ground
Z plane for the characters, walls, etc
X plane for the depth

all my visuals in the game will be Sprites (from Aseprite)

the game will be pitch black and you will see light when there's a point light

that point light will illuminate a certain radius on that specific floor and you will only see sprites when there's light, otherwise they are all pitch black

what I did so far was to create a new Material using shader URP > Lit with render face both sides activated

add the aseprite in the scene and change the material to my custom one, I also edited the sprite (in debug mode) to cast shadows + receive shawdows enabled

question: how can I illuminate the sprite and cast a shadow towards the camera instead of having a silhouette only?

attempt of a TLDR (which will be hard thing to do):

  • 3D world with no environment light whatsoever (pitch black)
  • 2D Sprites for characters and walls
  • fixed Ortographic camera position (no rotation)
  • Sprites to be visible only when there's a Point Light (3D) and to cast shadows on the sprites

current results:

  • case 1: sprite is visible because there's a light between the camera and the sprite (this one is working as intended ✅ )
    shadow
    sprite
    light
    camera

  • case 2: sprite is full black, can only see the silhouette because light is on the farther side from the camera and it's not illuminating the sprite to the camera (❌)
    light
    sprite
    shadow
    camera

question: how can I illuminate the sprite and cast a shadow towards the camera instead of having a silhouette only?

twilit vault
echo rover
#

will drop the question there, thanks for the tip

twilit vault
#

the issue sounds like a lighting thing (which is covered by that channel)

#

hm wait going at it again i'm not sure what it'd be lol

#

case 2 is because it's illuminating the back of the sprite, it sounds like?

echo rover
elfin sandal
#

anyone know if unity's 2D light system can have different shadows based on a sprite's animation

hollow crown
#

I would assume it is possible, though I would expect if it's not there by default you would have to use code to make it happen

elfin sandal
#

but it looks like shadow caster doesn't have any documentation on the unity website

#

so how would I do that

elfin sandal
#

i don't see a property for shape

hollow crown
#

I don't think the API is very advanced as of now it seems

elfin sandal
#

dissapointing

worn zealot
#

@elfin sandal you can have separate gameobjects activated by animation states, so that could be a workaround.

elfin sandal
#

that's really hacky

wanton sparrow
#

Anyone know how to reference the light via code using the universal render pipeline?

eternal hamlet
#

There's code here that edits the shape to help you with editing your own

inland jacinth
#

@olive viper There's nothing included in Unity to do that, but theoretically possible with custom editor scripts.

candid onyx
#

When i stop moving the player slides slowly to a stop. anyway to make this more instant? @ me please. thanks in advance

still tendon
#

@candid onyx use rb.velocity

#

I think you're using Addforce

lone ridge
#

Hi

#

I´m having a trouble, what I want to do is an pick up system with slots

#

for guns but the thing is I dont know how to, If anyone can help that will be awesome, my expectations are, pick up the gun, assigning that to a slot(I have 2 slots in the game) and throw the gun

wild meteor
#

@wild meteor

sinful pilot
#

Making a 2D game rn, but it's very laggy. Why?

plush coyote
#

unoptimized code?

tropic inlet
#

What's laggy? The game in general?
Or just your input processing?

#

Maybe unoptimized code.

hybrid kernel
#

@olive viper at runtime?

stable raft
#

Is there a way to alter a rigidbody2D's moment / rotational inertia in the editor?
The scripting API says Rigidbody2D.inertia is a thing, but I can't seem to mess with it before runtime.

sweet swan
#

oh shoot one second

stable raft
#

Angular drag is different; angular drag is how quickly angular speed naturally dissipates
I'm looking for a way to mess with the moment of inertia i.e. how much torque it takes for a given angular acceleration
It looks like by default it calculates the moment by size and mass, which is great for ordinary objects of uniform density

sweet swan
#

yeah my b was thinking of smth else

real pilot
#

hey, I created pretty much the simplest 2D platformer game there can be, every thing is a 1x1 unit object with a box / edge collider

#

every sprite is 128x128 and ppu is on 128

#

my player has a rigidbody with collision detection on continuous

#

how can i fix the gap between the player and ground collider?

#

i read online that you have to scale the game so this gap isn't noticable, what exactly should i scale up?

#

if i scale each gameobject by some factor, then i would give up the "1 unit 1 tile" principle, is this the only way?

real pilot
#

is everyone really just working around this problem by scaling their colliders down a bit?

eternal hamlet
#

Do you have a screenshot?

real pilot
#

the black square is the simulated player

#

there is a very visible gap between its collider and the other colliders

#

changing the collider types doesn't fix it

#

if i reduce the Default Contact Offset value in the Physics2D settings then the collision won't behave correctly

#

only solution seems to be scaling down the players collider which is very ugly or scaling up the game so one tile is multiple units large which sucks for level design and things like gravity and acceleration physics

#

this is from a completely random youtube video that talks about another topic, but if you look closely you can see the exact same gap between the player and the ground

#

the guideline for pixels per unit is that it should equal your default characters size, but if you do exactly this then you have a visible gap between colliders

#

things like this are the reason why in my last game i did all physics simulation and collision detection completely in code without unity components

real pilot
#

if i either have to shrink my collider size by a fraction of a unit or completely change the physics settings like gravity, then why does the box collider align itself to my square graphic in the first place and why is the standard gravity value -9.81 units/s if both of those together can never actually work together without this ugly gap???

fossil shard
#

are there any good tutors on top down ai? All the series I watch seem to end halfway in..

torpid marlin
#

How to reference a script from another object? Currently want to disable the script

drifting elk
#

How to reference a script from another object? Currently want to disable the script
@torpid marlin you need to reach out to the game object, get the script component en set enabled to false

#

something like:

#

targetObject.getComponent<ScriptName>().enabled = false;

torpid marlin
#

ok thx

drifting elk
#

What kind of cools are you making @torpid marlin 😄 ?

torpid marlin
#

its my first game without a tutorial so I decided to go simple, I decided a game like flappy bird but in space where there is a rocket going around with asteroids, and might make new planets might not upload it anywhere though

drifting elk
#

😄 cool!

torpid marlin
#

well thanks for helping 🙂 me I really appricate it, now I have to go back to school and I will continue my game later

drifting elk
#

Goodluck!

torpid marlin
#

thank you, you too if you are also making a game!

drifting elk
#

Thanks!

torpid marlin
#

Your welcome!

polar drift
#

My code is supposed to aim at Enemy, but when I spawn enemies the name changes to Enemy(1) and the turret wont aim at it anymore

#

dont know how to post my code

grave plume
#

change how aiming works, instead of searching for a name, search for a type or tags instead

polar drift
#

Ill try

shadow sapphire
#

directionVector = (transform.rotation * Vector3.right);
Would the magnitude of this vector3 always be 1?

civic knot
#

Not as far as I know. You'll need to normalize it.

#

Actually I'm just being stupid, so, yes, it should.

#

Draw a square on paper, then a line from it's center to one of the sides, rotate that line around the center. The length of the line would remain the same regardless of rotation.

shadow sapphire
#

nah it is

#

lmao

eternal hamlet
#

Has anyone used the 2d nav mesh on github? Can you bake at runtime? And can you update the bake in small section if one part was to change?

steel hill
#

I've got some UI elements in my game. Left clicking interacts with the UI, but also casts abilities in-game.
What area of Unity/C# should I look into to learn how to not have UI clicks be registered by the game world?

eternal hamlet
#

I think you can untick raycast target on the ui to stop the ui clicks

austere iron
#

no, they don't want to cast abilities when they click on the ui...

steel hill
#

Okay thanks, ill look into that. However the in-game abilities are activated using Input.MouseButtonDown or whatever, so that would still get triggered yeah?

eternal hamlet
#

Ah sorry yeah I misunderstood the question

#

Maybe you could detect when the mouse is over the gui and set a bool to true, false if not and don't cast abilities if bool is true

opal socket
#

Has anyone used the 2d nav mesh on github? Can you bake at runtime? And can you update the bake in small section if one part was to change?
@eternal hamlet 2d nav mesh?

eternal hamlet
#

@opal socket yeah there's a 2d nav mesh on github, I would link it but I'm on my phone

opal socket
#

You mean this community repo?

#

It wasn’t developed by Unity was it??

eternal hamlet
#

Ya, don't think it was developed by unity

swift pine
#

Hey

#

I need help

tired warren
#

@swift pine Next time a screenshot from your actual computer would be helpful 😉 Double click that error and it will take you to the line in your code where the issue is. NullReferenceExceptions are pretty common. It means that you forgot to assign whatever object you're trying to access. Whether you need to assign it in the Inspector or whether you're getting it through code.

swift pine
#

@swift pine Next time a screenshot from your actual computer would be helpful 😉 Double click that error and it will take you to the line in your code where the issue is. NullReferenceExceptions are pretty common. It means that you forgot to assign whatever object you're trying to access. Whether you need to assign it in the Inspector or whether you're getting it through code.
@tired warren
The second pic isn't loading

tired warren
#

RIP

#

Can you show us what your Update method looks like? The error is originating from line 18 of your ClickManager script. What does that look like?

swift pine
#

Wait 1 sec

#

Finnaly!

#

@tired warren

#

Here it is

eternal hamlet
#

Use the Windows snipping tool to take screenshots

swift pine
#

It's a clicker game :/

#

Use the Windows snipping tool to take screenshots
@eternal hamlet
Uhh, ok

tired warren
#

Yeah looks like you need to assign NumberText. I am assuming it's a Text object? if NumberText is public it should be exposed in the inspector and you can drag the gameobject with the Text component into the inspector value.

swift pine
#

U don't think I have snapping tool

#

@tired warren can I show you in a vc?

#

Sorry for ping

tired warren
#

sure

eternal hamlet
#

It just helps by making it easier to read your screen than taking photos

sudden ore
#

i got a question

open depot
#

Is there someone who know how to make your own Tile?
I mean i made them but i do something wrong or it bugged

keen skiff
#

I know nothing about unity code and I'm just trying to get stuff working, so I watched this tutorial. I have this movement script

using UnityEngine;

public class CharacterController : MonoBehaviour
{
    public float MovementSpeed = 1;
    private void Start()
    {

    }
    private void Update()
    {
        var movement = Input.GetAxis("horizontal");
        transform.position += new BitVector32(movement, 0, 0) * Time.deltaTime * MovementSpeed
    }
} ```
And there's an error saying 
"Assets\CharacterController.cs(13,95): error CS1002: ; expected"
Does anyone know what this is and how to fix it?
#

Oh yeah it's CSharp btw

fervent reef
#

It looks like you forgot a ; after updating transform.position

keen skiff
#

Alright thanks

near helm
#

i'm doing a 2d game, i have 3 scenes each has a canvas, i load them A->B->C with loadAsync Additive, it works fine, but when i close C, my active scene is B but the canvas shown by the camera is A, how can i manage this properly

eternal hamlet
#

Sounds like it just be a sorting order issue? Haven't used loading async before though

opal socket
#

i'm doing a 2d game, i have 3 scenes each has a canvas, i load them A->B->C with loadAsync Additive, it works fine, but when i close C, my active scene is B but the canvas shown by the camera is A, how can i manage this properly
@near helm are you instantiating the canvas? if yes, make sure to reparent it to proper scene.

upper path
#

Im sorry for being a complete noob to unity and almost everything game development related in general, but I want to share my code so I can get feedback but I dont know how to use hatebin, can anyone help me?

#

I saved my code in it, what do I do now

near helm
#

@opal socket no, canvas comes with the scene, i only touched the canvas scaler to scale with screen size

opal socket
#

I saved my code in it, what do I do now
@upper path just post a link and your question

#

also lines we are supposed to look at to make our lives easier

upper path
#

ok

upper path
#

I tried making my first game on my own without any assets, so far I've made a tileset and the character the player will control. I'm now working on player movement, and I didnt know where to go to find a tutorial on making a movement script, so I followed this website: https://www.tutorialspoint.com/unity/unity_basic_movement_scripting.htm . I also skimmed through its collisons page, and followed its rigidbodies and physics page too. Here's my script: https://hatebin.com/tonoqeuaub, when I tested my game, the character was WAY too fast and clips through tiles, is there a fix for this?

#

btw if you're asking why I skimmed through the collison page, I use a tileset, and that page didnt focus on them, so I watched Brackey's video on them instead

near helm
#

@opal socket should i disable my objects from my previous scene when i load a new one that's supposed to be on top? i dont like that, i have to go through all my objects twice, to disable and enable later

#

or maybe only the canvas idk

upper path
#

also my character just slowly falls in the air when it jumps

near helm
#

@upper path hmm i haven't used that yet, but why do you need to modify body.velocity and also its position?, also you can just lower the speed if it goes too fast

upper path
near helm
#

try removing line 23

upper path
#

Ok

#

Ill just comment it out

near helm
#

yeah

upper path
#

now I got an error: The referenced script (Unknown) on this Behaviour is missing!

near helm
#

i threw everything into a new scene and it works fine

#

i haven't looked into 2d movement yet so you may want to tweak some settings after, but your code should work

upper path
#

Thank you! Though there isnt gravity now. Can you link some sites or videos that might help me figure that out?

near helm
#

change the gravity scale for that

#

i still haven't figured movement out, it can get complicated fast, make it work and move to other things, i usually watch any youtube video to set up my movement at the beginning

upper path
#

Yeah now my character can spam the jump button to fly to space and it spins whenever it hits the corner of anything

near helm
#

when i did that on 3d, i had to measure it's distance to the floor to let him jump or not, and to stop the rotation it was something like transform.rotation = new vector3(0,0,0)

#

if you have free time i'd recommend to spam youtube videos about movement and you'll know a lot more than me

upper path
#

Thanks for the advice, its pretty late for me rn, so I'll look into it tomorrow!

near helm
#

you're welcome

idle shard
#

Component at index 2 could not be loaded when loading game object 'Main Camera'. Removing it!

#

what does this mean

#

like i removed the camera and it still wont go away and its a fresh project

eternal hamlet
#

@near helm are you wanting to only show 1 canvas at a time? or have them overlaid on top of each other?

#

if only 1 at a time then simply disable the ones you don't need

near helm
#

i can do that, i'll have to Find a canvas whenever i load or unload a scene

eternal hamlet
#

can have a GUI manager to keep track of it all

near helm
#

but i cant keep a reference to a canvas in another scene that isn't loaded yet

#

right?

eternal hamlet
#

that's true

still tendon
#

Is it possible to create a savesystem for something created in the middle of the game as a clone?

warm swan
#

Hi! Can anyone help me on my script? Im new to coding...

open depot
#

I have my own tiles - class with extend Tile
and it have a bool parameter

public class PathScript:Tile
{
     private bool edit;
     public bool EDIT { get { return edit; } }
     public void SetEdit(bool setEdit)
     {
        edit = setEdit;
     }
 //all override needed...
}```

and if i do something like:
((PathScript)tilemap.GetTile(new Vector3Int(x, y, z))).SetEdit(true)
~ set this "edit" bool for a tile with i took by Vector or is it setted for all tiles with are based at PathScript?
torpid jay
#

Can anyone help me so that my figure follows my mouse cursor with a delay so its not full speed?

open depot
#

@torpid jay need some code or something ...

torpid jay
#

If thats possible for you that would mean a lot @open depot

open depot
#

I mean i cant guess your code u have to show some of it at pastebin/hastebin or here between 3x` script and again 3x this

torpid jay
#

im new to unity I dont have code

open depot
#

So go for some tutorials in YouTube, read documentation or google it

torpid jay
#

Okay thanks

heavy token
#

@open depot only the one tile

opal delta
#
void OnTriggerStay2D(Collider2D other) 
    {
        if(other.tag == "Player")
        {
            if(Input.GetButtonDown("Jump"))
            {
                SceneManager.LoadScene(levelToLoad);
            }
        }
    }
#

anyone know why this is not working

#

I have

using UnityEngine.SceneManagment;
#

the box collider is a trigger

queen hamlet
#

GetButtonDown is only true on the frame the button went down, and OnTriggerStay2D is part of the physics cycle. Try GetButton

#

or if you prefer, move the Input check into Update and set a boolean member variable to true when they are inside the trigger.

opal delta
#

Thank you @queen hamlet

ivory sable
#

So I'm creating a scene transition in unity, but I'm having an issue. when the game loads I'm supposed to appear in a separate hallway. When i hit the trigger the initial value changes. This is only supposed to be a temporary thing, only working once until I hit stop. As soon as i enter and exit the 2nd scene, I'm teleported back to the starting position instead of the position the movement is supposed to place me. I've tried adding this code:

#
    {
        int run = 0;
        if (run < 1)
        {
            startingPosition.initialValue.x = -345.7399f;
            startingPosition.initialValue.y = 163.2162f;
            run = 2;
        }
        else if (run == 2)
        {
            transform.position = startingPosition.initialValue;
        }
        Debug.Log("run =" + run);
    }```
#

but it doesnt work. even if the run value is 2 it will still place me at the run > 1 code

#

i did it in a start because for some reason whenever a new value is put into the VectorValue, it saves it even after play mode is stopped

heavy token
#

where is startingPosition declared?

ivory sable
#

in the walking code, public VectorValue startingPosition;

upper path
#

help I keep getting an error everytime I click something in my scene, the error is: NullReferenceException: Object reference not set to an instance of an object

#

This never happened before and just popped out of nowhere when I opened it today

#

I didnt even do anything yet

craggy briar
#

Double click the error, it should take you to the code causing it

upper path
#

probably unrelated but when I tried to change the size of the hierarchy window and navigation window and the other ones, it seems glitchy and black bars show up UnityChanAfraid

craggy briar
#

¯_(ツ)_/¯

upper path
#

The hiearchy part of the screen freaks out when I click something in the scene 😖

craggy briar
#

Yeah that doesn't look right

upper path
#

I think I'll just make a new project

craggy briar
#

Could just need to restart Unity

upper path
craggy briar
#

No

#

That's just how your windows are laid out and stuff

upper path
#

oh

#

Yeah that might be why unity was glitchy

#

or my computer is just that potato

craggy briar
#

Looks like you maybe had an editor extension or something that broke

upper path
#

its not letting me choose Load Default Layout

#

just gonna pick "Revert Factory Settings"

#

even that option isnt doing anything 😔

lean estuary
#

Delete layout files in AppData and project folder, use search to find them

upper path
#

idk where they are, theres nothing in my AppData folder

#

theres some folders named with "layout" in their names in my Library folder thats in the my project

#

WAIt

#

Im trying to reopen my project

#

its loading so far 👀

#

ok nvm its back to the Failed to load window layout window

#

Im going to try deleting the library folder

upper path
#

everything in the scene is gone but I didnt put much in there yet so its fine

elfin sandal
#

it's in a layer over the sprite that's under it

craggy briar
#

Try changing its sorting order

#

In the sprite renderer

#

If that doesn't work, try moving the floor ABOVE the player in the hierarchy

elfin sandal
#

doesn't work

#

it's weird because it's only an issue with one animation...

#

look

hard vale
#

I want to draw a 2D circle in middle of the screen and if any objects goes outside of it
it should be game over
how would I approach this?

elfin sandal
#

ontriggerexit2D

hard vale
#

how would I draw the circle....

elfin sandal
#

sprite

hard vale
#

I could do a circlecollider2d and make it big enough?

#

and use ontriggerexit2d?

elfin sandal
hard vale
#

Hmm cant I draw circle using code only?

elfin sandal
#

u can

hard vale
#

Linerenderer?

elfin sandal
#

only debug circle tho

#

idk

hard vale
#

but ill have that circles radius right?
so if any object with tag crosses it
it will be game over or something

#

😅 new me...

elfin sandal
#

what

echo vigil
#

Not sure if this is the best place to ask about this but I'm trying to make a diagonal line in UI, it seems to be going well but it doesn't want to go diagonally between two points, only straight. The line is made like this

synapse.sizeDelta = new Vector2((neuronIn.anchoredPosition - neuronOut.anchoredPosition).magnitude, 4);

synapse.position = new Vector3(synapse.sizeDelta.x / 2, 0, 0);
``` I'm not really sure how to go about making it diagonal between the "neuronIn" and "neuronOut" elements.
#

and yes, if you're wondering this is for rendering a neural network

#

the "synapse" element is a child of "neuronIn" by the way

craggy briar
#

What is synapse, a RectTransform?

solar thicket
craggy briar
#

Also, you could probably just use a LineRenderer

solar thicket
#

I'm not sure the built in linerenderer plays well if it's rendering on a canvas

echo vigil
#

idk, this is working pretty well for drawing lines, its a RectTransform yeah.

#

and a LineRenderer does not work

#

I suppose the thing you linked could work I just don't feel like using someone elses assets.

solar thicket
#

I just don't think you're likely to ever get very good results by trying to make a rectangle act as a line

craggy briar
#

@echo vigil I'm not sure what you mean by it only wants to go straight

echo vigil
#

I haven't been able to implement a way for it to go in a different direction, if the rect its going to is not on the same y level

craggy briar
#

You're probably gonna need to rotate it instead of just scaling it

#

Got a screenshot?

echo vigil
#

Yes and rotating is the part I don't know how to implement

#

heres how it looks right now, the line is supposed to link up to the first one but since it's straight, it can't do that.

craggy briar
#

transform.rotation

#

You'll need to use a bit of trig to figure out how much to rotate it though

echo vigil
#

precisely, that's the part I'm not sure on how to do

craggy briar
#

Sine = Opposite/Hypotenuse

solar thicket
#

socatoah!

craggy briar
#

^

#

Hypotenuse will be the distance between the image and the point

#

Opposite will be the difference in their y coordinates

craggy briar
#

You'll have to play around with using either the corner of the image for the distance, or the center, or something. Not sure

echo vigil
#

I'm not sure how I would get the distance between the two points since their positions are controlled by their own layout groups

solar thicket
#

I would expect whatever position you read from it to be accurate as to where it actually is post-layout

#

it looks like you're reading the anchored position which won't change though

#

i forget if there's a 'real' position you can read instead, or if you have to apply some kind of offset or something, but that might be your issue

echo vigil
#

I'm not sure, I'm not really that good at UI stuff so..

craggy briar
#

I'm not sure how I would get the distance between the two points since their positions are controlled by their own layout groups
@echo vigil ```cs
Vector2.Distance(object1.transform.position, object2.transform.position);

echo vigil
#

Hm. It doesn't seem like transform.position is gonna work since the position would just be it's position in a layout group I have

#

unless I did the math wrong here, might've. ```Csharp
synapse.transform.rotation = new Quaternion(0, 0, Vector2.Distance(neuronIn.transform.position, neuronOut.transform.position) / (neuronIn.transform.position.y - neuronOut.transform.position.y), 0);

craggy briar
#

Yeah, you're trying to edit a quaternion directly, bad times

#

Use Quaternion.Euler instead

echo vigil
#

never really used them before :p

craggy briar
#

They're confusing as hell

echo vigil
#

"Assertion failed on expression: 'CompareApproximately(SqrMagnitude(result), 1.0F)'"

craggy briar
#

With what code?

#

That's a new one

#

Assertion errors like that are Unity itself throwing errors, as far as I'm aware

#

Not sure though

echo vigil
#

all I did was change it to use Quaternion.Euler instead of making a new Quaternion

craggy briar
#

Google's telling me it's because you're taking the square root of 0, neuronIn and neuronOut aren't the same position, are they? Try Debug.Logging each to be sure they're not

echo vigil
#

That's what I've been trying to say, they are very close to being the same position since they are both under different layout groups.

#

though of course, the layout groups are at different locations

craggy briar
#

I dunno, transform.position shouldn't care, it should just give their positions on screen as far as I'm aware

#

Might need to do something different because it's a rectTransform

echo vigil
#

huh, I'm debugging the positions now and it seems like all of them, no matter what are at 0,0,0. might be because they are under layout groups?

#

It's getting very late here, 4:15 AM so I'll be leaving it at here for now. I'll check back on this tomorrow.

craggy briar
#

Might try using their pivot

#

anchoredPosition is working for me

#

Even if under a GridLayoutGroup

solar thicket
#

yeah, ui handles positions differently than the world does

#

most of your ui elements transform.positions should be at 0,0 (in the world) but what you want to look at are the rectTransform positions

craggy briar
#

Yeah they were doing that though, still getting 0 it seems

echo vigil
#

Hm no, the rectTransform position still gives out 0,0. @craggy briar @solar thicket

#

anchoredPosition is not 0,0 though. Just tested it

craggy briar
#

Try anchorPosition, that was working for me

echo vigil
#

Mhm, I am debugging the positions and they arent 0,0 but it still gives that error.

craggy briar
#

Weird. Was worth a shot

echo vigil
#

not sure what to do then, since this error should only be caused if they are at 0,0?

#

though, the positions are questionable. They are like this no matter what other "neuron" I give it

echo vigil
#

yeah I don't think these positions are correct at all

solar thicket
#

I just don't think you're likely to ever get very good results by trying to make a rectangle act as a line
@solar thicket

echo vigil
#

well I would expect to be getting some kind of result instead of nothing at all

soft wyvern
#

Whatsup guys, I'm looking for a bit of help. I am trying to create view/lighting/fog of war type system similar to how "Among Us" handles it. Where you cannot see around corners and such. Any ideas, links or whatnot could help get me started on this?

#

I started off using some raycasting, But I haven't the slightest clue how to get light to appear in some areas and not others. I assume this could be done with overlays.. Such as tiling out the world and each 1x1 square has a black texture over it and based on what's in sight, the tiles above the map are removed.. But then you end up with a blocky mess.

oblique oak
#

I am sure that the 2D lights of Unity's URP could do that easily, however they don't seem to do soft penumbras/shadows (yet?)

meager mural
#

make a cone shape sprite, apply a polygon collider on it set it to a trigger, then if not inside collider, cant see sprite renderer, else if someone is inside it, show sprite renderer

#

hmm, then it would need to deform around corners and such think

#

someone on youtube has a view cone system. code monkey maybe?

solar thicket
soft wyvern
#

Much appreciated guys.

fossil axle
echo vigil
#

@solar thicket the problem is that I'm not getting the correct position for the "neuron" elements due to them being a child of a layout group

fossil axle
#

oh, wait a minute im stupid, he defines the function later sorry to bother everyone

solar thicket
#

@echo vigil yeah, I'm just not sure offhand how to solve that and it feels like a waste of time to me when you could just use something actually designed for what you're trying to do. but hopefully somebody else knows more than me and can jump in at some point

echo vigil
#

@solar thicket yeah but the one you linked will also have me use positions no? and without me being able to get proper positions of an layout group element I'm not sure it would work either.

solar thicket
#

@echo vigil The ui rendering system doesn't work the same as the world rendering system in ways which I couldn't enumerate, but have heard tales of. I haven't used that line renderer, but I would expect a ui line renderer to support what you are trying to do (draw a line between two elements and stay updated if their positions shift) out of the box. A the very least, I'd play around with it and see how they are doing things and maybe it would give you an idea of where to go with your versoin

echo vigil
#

Yeah hm. I'll try and use the one you linked.

solar thicket
#

nice! I'll be curious to hear if it helps or if I'm just sending you down a pointless rabbit hole 😄

echo vigil
#

@solar thicket Hm well, the line renderer DOES work but I'm not really getting anywhere due to giving it the wrong positions and I'm unsure on how to give it the correct positions.

#

transform.position gives 0,0 and anchoredposition no matter what gives -282,-292

frank pendant
#

Does anyone know how to have a CapsuleCollider2D match the basic dimensions of the object sprite?

solar thicket
frank pendant
#

atm i just need a way to fetch the object sprites length and height ; is there a field in the sprite class that fits this?

#

oh i think ive found it

#

sprite.rect.width
sprite.rect.height
for those wondering

swift knoll
#

hi

#

I need help, I am a beginner and I am learning 2d and now when I hit the play button my character starts floating for some reason!

#

never mind, the problem was that there was an animation or something!

#

no I do mind

#

it still doesn't work

solar thicket
#

you aren't really giving us enough information to know what your problem might be

#

why wouldn't your character float? are they a physics object with gravity?

swift knoll
#

yes

#

rigidBody 2D

#

when I hit the start button it plays some kind of animation

solar thicket
#

if the animation is setting their transform position, it could conflict with the phyiscs

swift knoll
#

??

solar thicket
#

make sure the animation doesn't have any keyframes which change the character's position

echo vigil
#

Didn't get anything in that thread to work here. It seems the layout group is causing quite a lot of issues

#

I guess I could compare the distance between the two layout groups instead?

swift knoll
#

I don't have an animation even

solar thicket
#

@echo vigil mmm maybe you can toss the layout groups in the bin and move everything around yourself?

#

when I hit the start button it plays some kind of animation
@swift knoll you just said it plays an animation!

echo vigil
#

I could but it would certainly complicate my other code

solar thicket
#

yeah :/ I think i would probably not use the ui for what you're doing

#

put everything in the world and keep it all aligned to a plane and scale that whole thing as needed

swift knoll
#

why?

#

why should change the layout?

solar thicket
#

sorry, not you, I was talking to penguin

swift knoll
#

I said it moves like if it was animation but there is no animation

solar thicket
#

@swift knoll it's hard to help without a video or something. 'an animation' can be literally any movement and if it's a physics object, then it moving makes sense

swift knoll
#

it was going up and down smoothly!

#

plus thanks you reminded me that I want to install OBS studio since quite some time😅

echo vigil
#

@solar thicket I'm really surprised on how hard it is to get the positions, I've managed to the the X coordinate by subtracting the positions between the two layout groups but no idea on how to get the Y coordinate.

soft wyvern
#

Hey guys, I downloaded an asset package which uses LWRP and imported it (My project didn't have that package installed apparently so a bunch of stuff didn't work right). I installed the package but the "LWRP Asset" file still says it couldn't associate with a script. Any ideas what I might be missing?

#

I downloaded "Lightweight RP" from unity package manager and didn't fix it.

solar thicket
#

LWRP is now URP, so you may have a version mismatch or something

soft wyvern
#

Oh okay

echo vigil
#

I did it! After googling for a bit I found this answer
"After several tests, I found out that the position after you call SetParent(objParent, True); is right; but due to something related with GridLayoutGroup, the position is changed in the time after this and before the end of the frame. So take a record of that position and do whatever you need in other frames."
So, I created this coroutine. And it works just fine!

IEnumerator CreateLine(RectTransform synapse, RectTransform neuronIn, RectTransform neuronOut) {
        yield return new WaitForEndOfFrame();
        UILineRenderer lineRenderer = synapse.gameObject.AddComponent<UILineRenderer>();
        lineRenderer.LineThickness = 5;

        Debug.Log(neuronOut.anchoredPosition.y);
        Vector2[] points = new Vector2[] { synapse.sizeDelta / 2, new Vector2(-(neuronIn.parent.position - neuronOut.parent.position).x, -(neuronIn.anchoredPosition.y - neuronOut.anchoredPosition.y)) + synapse.sizeDelta / 2 };
        lineRenderer.Points = points;
    }
#

@solar thicket

solar thicket
#

ahhhh tricksy

#

nice one

echo vigil
#

surprised it works but, well, thankfully it does

solar thicket
#

I think there might also be some kind of ForceLayout() thing you can call which might also work

echo vigil
#

Eh, this work well enough, I don't think I need anything better

#

I think it looks choppy because I'm using the editor

#

Time to add more detail into it :p

echo vigil
#

Only problem now is that it renders above the circle, which isn't exactly what I want. It's probably because it's a child of the circle. I might have to change it to not be a child then.

inland jacinth
#

Should be able to just lower the render queue of the line renderer material

echo vigil
#

Oh, didn't know that was a thing

inland jacinth
#

Well, don't know anything about UILineRenderer

echo vigil
#

well setting a material gives this error so I'm assuming that won't work Material SynapseMaterial doesn't have _Stencil property

inland jacinth
#

You could also try changing the Z position of the lines

#

So they are always behind the circles

echo vigil
#

sadly that isn't a feature of this line renderer

#

only takes in a Vector2

inland jacinth
#

Does moving the transform not do anything?

echo vigil
#

no, it doesn't affect the line

#

oh wait, it does

#

moving it behind the circle works but it still renders infront of the circle

candid onyx
#

I have an issue where my balance text isnt updating to the user money. my purchase function works because the money goes down but it isnt shown in the UI

#

@ me if you can help 🙂 should be simple fix because Ive done this stuff before but I dont see my error this time

heavy token
#

post the code where you Update your text

oblique oak
#

Does changing Sorting Layer/Order break batching?

echo vigil
#

are you asking me or is this just your question for other people?

oblique oak
#

Just general yes

echo vigil
#

not sure what you mean

eternal hamlet
#

he's asking others

echo vigil
#

aight

rancid rain
#

Throwing my inquiry out here as well.. just in case..

#
    public Vector2 minChange;
    public Vector2 maxChange;
    public Vector3 playerChange;
    private CameraMovement cam;

   void Start()
    {
        cam = Camera.main.GetComponent<CameraMovement>();
    }
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.CompareTag("Player"))
        {
            cam.minPosition = minChange;
            cam.maxPosition = maxChange;
            other.transform.position += playerChange;
        }

I'm unsure why this isn't moving my player object D:

eternal hamlet
#

@rancid rain have you put a debug.log in there to make sure it's triggering?

rancid rain
#

It's triggering, the camera zooms off, the player just remains D:

eternal hamlet
#

maybe playerChange is 0,0,0...put debug in there and check what playerChange is

rancid rain
#

I manually set it here, but it doesn't seem to do anything. The settings for the camera in this screenshot work fine.

eternal hamlet
#

is the collider on the parent object in the player? not on a child object?

rancid rain
#

the collider is on a child out of necessity.

eternal hamlet
#

try doing other.transform.parent.transform.position

#

right now it would only be moving whatever object the collider is on

#

if it's on a child then it would only move the child

rancid rain
#

would the child being tied to the parent prevent the child from moving as well? .. or at least it would seem to not move?

I think you're on to something with this parent thing, but my coordinates are off a bit.

eternal hamlet
#

the childs local position would change

#

but if you move the parent then they would stick together

rancid rain
#

HURRAY, You've done it. the other.transform.parent.transform.position was perfect. The only issue was that my child isn't properly centered on the parent, so I had to compensate a bit 🙂

#

Now.. because my 'rooms' don't line up at all, I need to find a way to cover that transition. Think I'm going to just make the camera fade to black for a second or something.

eternal hamlet
#

do you have a bunch of rooms in the scene and wanting to teleport the player to the next room?

rancid rain
#

Yeah.. like.. I'm SURE this isn't how the game in my mind should be developed, but they're the only tools I have at my disposal right now lol

Everything is just one scene so far, basically what we've just worked out is the walking between 'zones' .. in my mind it's like exiting a cave from pokemon. In reality.. I'm sort of mashing things together to make it seem that way lol

#

Currently when you 'zone' the camera and player zoom off glitchily, I figured I would just hide that under a black 'loading screen'

eternal hamlet
#

how big are the zones?

#

if it was say a cave entrance then you could have a spawn/teleport point set up for each room

rancid rain
#

Nothing is very big now. I'm starting small, trying to wrap my head around how things work together and expanding from there.