#๐ผ๏ธโ2d-tools
1 messages ยท Page 32 of 1
create the object, attach a rigidbody2D, and in update() type if()
whoops
thats a tough one
Damn
don't stress it to bad, I have the answer but it's hard to type out
I'll DM you
Please
hey, I am hoping somebody can help me out with something. I am trying to create a rope in my game that swings but one of the nodes in the array im using sometimes is inside the player. is there a way to prevent the player interfering with the node?
if needed, I can provide the code used for the rope system
i dont think what i wrote explains it properly so heres a video
I've various cameras, those render onto rendertextures, these I display in a Canvas with RawImages using materials generated off the Hidden/BlitCopy shader - My issue is I have one of those raw images on top of another one and cannot get alpha to work no matter what I try.
Relevant parts:
cam.clearFlags = CameraClearFlags.SolidColor;
cam.backgroundColor = new Color(0, 0, 0, 0);
camrenderTexture = new RenderTexture(w, h, 24, RenderTextureFormat.ARGB32);
rawimage.material = new Material(blitCopyShader);
material.SetTexture("_MainTex", cam.renderTexture);
Am I missing something obvious?
is there a way for me to tell the game to use "whatever key left is"?
I want to detect when the user presses left, but obviously the key for that might get rebound, so I don't just want to use the 'A' key
input manager
Input.GetButtonDown("Left")
and define the left button in the input manager
Either that or in the new input system, use an InputAction
I'm not too sure how to do this part though.
I can change the keys for specific things in the input manager, but I don't know how to define what "Left" is.
The input manager kinda stinks
it's an array
if you want to add something
then you go to the top and increase the size the array by 1
Or I think you might be able to right click and say "add element"
but I'm pretty sure there's a built in "left" axis
you do float horiz = Input.GetAxisRaw("Horizontal") if (horiz < 0) { // whatever
I guess it would just be checking if input is < 0 wouldn't it
yeah
oh yep
you beat me to it ๐
hmm, but that will trigger on hold as well, I need taps
I wonder if there's a way to distinguish between individual presses of a horizontal key
Yeah you'd make a button
I personally hate the Input Manager and have switched to the new Input System in all of my projects, but it's a bit of work to get up and running with it, and has more of a learning curve
I might try that out once I'm more accustomed to this, but I'm tryna cover all my bases as I learn
huh, new question
as you can see, I've defined what Right and Left are
but I'm still getting a "Input Button Right is not set up" error when it tries to use my script
hmmm
should definitely work...
are you using the correct casing?
"Right"
"right" won't work
Also make sure your changes in the Input Manager "took"
press enter after typing everything there
"right" is what the input manager uses for the right arrow key
whereas "Right" is the button name
no yeah I mean
in the "name" field
and in your code
those need to match
"right" is ok for the alt positive button
Make sure you don't have like an invisible extra space after "Right" or something
yup, it's capitalized in my code as well, no extra spaces in the manager
๐ค
should work based on that
what's your code look like?
warning in advance, please excuse my excessive use of &&
I'm just testing to see if I can make stuff work in theory right now
and it fails on that first call?
when I save the script and try to compile
oh really?
is there somewhere else in unity where I need to tell it that I've added a button?
Pretty sure just the input manager
oh
I had to give it a little bit to accept the changes I guess?
I was about to suggest reopening your project
I guess so - to be honest I've never actually added an axis to the input manager haha
np
well, I'm trying to do movement without much assistance from physics
so I need a weird input setup
actually
I wonder how GetButtonDown works with Horizontal ๐ค
I'll have to test it
It probably works only for the positive axis
would be my guessw
but good question
worth testing
ooh, okay, here's something
is there a way to lock my game at 60?
it feels like it's running faster than 60fps which will make input windows a little screwy
awesome, thanks
i was told that this chat is better for my question, so how would i generate a dungeon if i want it to be in a tilemap, so the rooms are not objects but just a bunch of tiles
get some pictures of the dungeon, you wanna make. make a tilemap, copy ur pictures to the tile pallete
and just paint ur dungeon out
I would recommend you creating some cells and afterwards puting them together
How to make script for find the gameobject from another scene in unity
I have tried but i cant find a way to make more pieces of code work at once. It all just goes in order all the time. Can anyone help?
public class PlayerController : MonoBehaviour
{
private new Rigidbody2D rigidbody; //this object's rigidbody
public float playerAccel; //acceleration speed of the player
public float playerSpeedCap; //speed cap in u/s
[Range(0.0f, 5.0f)]
public float velocityKickback; //how much force to apply when not moving
// Start is called before the first frame update
void Start()
{
//get this object's rigidbody
rigidbody = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void FixedUpdate()
{
//cap the player speed
if (rigidbody.velocity.sqrMagnitude > playerSpeedCap*playerSpeedCap)
{
rigidbody.velocity = rigidbody.velocity.normalized * playerSpeedCap;
}
//add a force to move responding to player input
rigidbody.AddForce(new Vector3(Input.GetKey(KeyCode.D) ? 1 : (Input.GetKey(KeyCode.A) ? -1 : 0), 0, 0)
.normalized * Time.fixedDeltaTime * playerAccel);
//is the player moving?
bool isMoving = Input.GetKey(KeyCode.D) | Input.GetKey(KeyCode.A);
//apply force in the opposite direction of the player velocity to slow down when not moving
if (!isMoving)
rigidbody.AddForce(-rigidbody.velocity * velocityKickback);
}
}
i've got this and it's giving me jittery movement. any ideas why that may be?
don't use Time.fixedDeltaTime for AddForce (although that won't cause jitter, it's just not necessary)
the speed cap could cause jitter
apply your speed cap at the end of FixedUpdate, not the beginning
also what's your camera setup?
If there's a mismatch in camera vs target motion (update vs fixedupdate) that can cause jitter too
i'm lerping the camera to the player rb position, so the camera is smooth but the player isn't
send the camera script
changing where the speed cap is had no effect it seems
public Rigidbody2D rb; //rigidbody to follow
public float followSpeed; //speed to follow at. 1 snaps the transform to the rb, 0 doesn't follow at all.
void Update()
{
//lerps between the rigidbody position and the transform position.
Vector3 moveTo = Vector3.Lerp(transform.position, rb.position, followSpeed);
//preserve layer
moveTo.z = -10;
//set position
transform.position = moveTo;
}
the camera looks smooth in editor, the player does not
the camera also looks smooth in game
do it inside LateUpdate
Does anyone know how to do an Enemy Indicator? like an arrow that points to the enemy.
the camera looks fine though? this isn't about the camera it's about the player itself
@low shadow because you're following a Rigidbody, you want to update the camera position in FixedUpdate.
or you can set the interpolation mode of the object
by default Unity runs physics at 50fps
which....is always just slightly out of step with 60hz monitors
so you can also change your physics frame rate as well
the whole problem was infact just that i was using Time.fixedDeltaTime, may i ask if i was even using this correctly?
you probably aren't.
there's no reason to use it the way you were using it
fixedDeltaTime is something you generally SET, it doesn't represent frame time.
Time.deltaTime is the time between frames
you may as well have replaced that variable with the literal value .02f
think about how odd it would be to put that in your code
the jittering i was seeing was probably random framedrops then.
i was unaware that it was not like Time.deltaTime the name implies(at least to me) that i would use it in the FixedUpdate function , instead of using Time.deltaTime
yea i know
bad name
Time.deltaTime is actually smart enough to understand whether its inside Update or FixedUpdate
It's literally just the constant value you set in Project Settings -> Time -> Fixed Timestep
well, i got it fixed in the end! thanks for the help humans!
@snow willow its not a constant โค๏ธ
I'm using the term relatively to Time.deltaTime
for a math undertanding of what that skip is
if your Update FPS is ~60, and your Physics FPS is 50
you will inevitably end up out of phase
skip/jitter
huh, interesting
good to know for future!
hopefully i won't make the same mistake again!
Yeah but none of this has to do with the use of the value FixedDeltaTime in your FixedUpdate code
in fact I don't reasonably see how using it would cause extra jitter
it just scales a number down by 1/50th
my computer is, inconsistent lets say
doesn't matter
@snow willow You end up with more Updates than FixedUpdates
it'll be the representation of framedrops as if i wasn't using deltatime normally
I know that, but again, that's not specifically related to using TIme.fixedDeltaTime in your calculation
correct
that's just a problem of having camera updated in Update and object updated in FixedUpdate
Time.fixedDeltaTime doesn't really care, it'd be a bit inconsistent occasionally, but the hiccup isn't caused by its usage
Rigidbody.interpolation is also a good way to resolve it
it was already set to interpolate is the strange thing, it was much worse without it on
i should probably make a proper example/tutorial thing for this issue...
gonna have to turn my monitor refresh down tho ๐ฆ
@low shadow
There... that a decent matrix of stuff
@snow willow too actually, just for completeness ๐
can anyone help me out?
I want to develop a 2d MOBILE PHONE game which is like
a grapple gun swingiing game so can anybody tell me how to make one?
because I am a beginner in unity
- Make a plan. Decide what features you want in your game. Make a list.
- Evaluate features from the list. What can you do and what not.
- Research into the topics that you don't know how to do.
- Create your game.
- Profit..?
Now, if you have specific questions, feel free to ask them and someone might help you out.
thank you very much @civic knot
ฤฑ need help with my parallax effect
ฤฑ use this code but it is not repeating and glitcy
https://picupt.xyz/img/ylgy8p35.png Is there a better way to check the end of the platform? Tilemap colider is everywhere and create 100 colider is very annoying. Or can I check, if I not anymore on the ground?
Hey @idle widget I might be wrong here, however i highly recommend not making a bigger game for your first game ( stick with one to 2 mechanics and a main objective). I would go on youtube search tutorials for diffrent mechanics or even full game tutorials. Go thru the whole thing and see what you understand. Then make the most simple game you can think of and grow from there. What i found with starting out and makeing a bigger game is by the time you get to the end , lets say your making a main menu to finish off. You realize that you could animate your first charecter much better now. This puts you in a never ending cycle on what should of been a simple game. So with that being said just learn the unity interface, basic c# coding, how pyshics work, basic movement, jump and maybe score tracking !
@idle widget whilst I agree with kevin about keeping the scope small there is also a lot of ways and tutorials about making grapple games so there is a big ground when it comes do doing things like that
thank you @boreal saddle and @real warren for that advice but I am already doing that and besides I cannot find the right tutorials for me even after ending up on channels like dani, code monkey and brackeys(I don't know if I spelled it correct). I have started unity a week ago and I used to make games in python but that games were looking so bad. That is why I am now learning from the official unity website. I hope I will become a good gamedev someday
well not always the big guys can help but little guys also have many tutorials that are awesome
Seriously bro I'll help you with coding your first game animations and all just let me know when you get stuck I found small YouTubers make even better content as well
Hi!
So I kinda have a small problem... I'm following a tutorial on youtube to get animations, for example jumping, on a 2D character.
He has this line of code:
public void OnLanding(){
animator.SetBool("isJumping", false);
}
and it works for him. But when I put in this code it gives me an error because the modifier "public" is not valid for the item "void"
does anyone know a solution to this?
@river wraith Make sure that code is inside a class.
ok i'm just stupid
thank you
hey guys!
I'm relatively new to game dev and I'm a little stuck. I've got a way to have different jump heights, and also buffer a jump, as shown from a tutorial. However, all my buffered jumps have the default height. Can someone help me fix this please?
here is the code
Can you explain a little bit? Like, whats a jumpbuffer and what should it do? As I am not firm with this terms
It's so if the player presses jump slightly before the character is actually able to jump (i.e on the ground again), the game is lenient and still allows your character to jump. Basically a small quality of life thing that stops the game from eating your jump input if you press it a couple frames too early
Okay, and whats your problem here? where do you set the height you are expecting?
I set jumpforce to 20 i believe
and this is where the variable jump length is. But whenever I buffer a jump, this section seems to be ignored
But you said, all jumps are the same height, but I dont see you altering it anywhere, so it is obvious to me, that its always the default height?
only the ones that are buffered. If i jump when I'm standing still or after I've already touched the ground, the jump heights are different
that last picture is where it alters the height
But thats intended in your code. If you just set the velocity its relative to the Y, but in your Jump() you are overriding the velocity complete with jumpforce
you might have to add the jumpForce to the y velocity, if thats what you want
But I am not understanding what you expect there. So your character can be "flying" up and you want to add the velocity of your jump force to the current velo?
All it is is that my y velocity is slowed when i release the jump button when im in the air. So the jumpforce i declared is the highest that i can possibly jump. And when i let go it slows that velocity so that the character doesnt jump as high
which works completely normally, except for when i use the buffered jump thing
i think because i will have already let go of the jump button before the character goes in the air when I use a buffered jump, that statement doesn't get applied, but I don't know how I would begin to fix it
Also I tried it and nothing changed :/
So your bufferedjump happens when? When your char is at ground?
yeah
So velocity will be 0 anyway?
the velocity is just set to jumpforce
Yeah but I mean, your character is already on ground, so its velocity is 0. so there is nothing to slow down in Y velocity, right?
ohhh
yeah its 0 when theyre on the ground
but if its buffered that will only be for 1 frame
As far as I understood you, the buffered jump just waits for it to be grounded, if so and buffered, just Jump(). So velocity.y will always be 0 when your buffered jump occurs
yeah
thats right
so i guess thats why it's not doing the Input.GetButtonUp("Jump") part
is there a way I'd be able to fix it?
or should I just find a different way to do it from scratch
You could just make the buffered jump an object that stores the velocity when pressed the key, then feed the Jump() with your value and add it to the jumpForce or multiply or whatever
so make it so the height of the jump is precalculated before the actual jump?
yep, kind of
yw ๐
Hey guys how can i make a controller like this
Grid Based Movement
something like this game
@still tendon Easiest is to always move by one Unity unit
does anyone know if it would be possible to record a series of clicks on the mouse and then take the users input to see how accurate their clicks are to the original series of clicks?
rigidboydy.AddForce on 3d dont work on 2019 LTS
Doubtful
do you have a specific scenario that's not working?
Like click position? Or their timing? Either way, yes.
Help
Anyone can help me with my "combo" system?
When I press "u", the player must execute 3 attacks in sequence. But I'm having some issues to get it working properly
Here's my Player code:
https://pastebin.com/fJXiHfEb
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
hey
im a new developer and got the clicker template thats free in asset store, i want to make a map where you click a icon then a map open with spots and then you can click some join them and when you click go there then youre here and get more clicks
like that
how? xD
a bit of help please
i am trying to make a top down 2d space ship game
and i need the camera to look and
is that possible?
what u mean exactly
someone can help me to resize the screen for different sizes
i mean
like 3:4 and 9:18
Game view has a resolution selector
but it only have only one view
?
let me explain better
im making a tetris
and i need it to run in 2 different resolutions
3:4 and 9:18
without bug
Yes
Use the resolution selector in the game view to test each of those aspect ratios
One at a time
i can make a different zoom for each?
im rewriting this f*** code for the third time
the last 2 broke ;-
I don't know what you mean by zoom
wait i will send prints to explain
like this
oh and im having a issue with the line delete
{
for (int i = maxY--; i>=0; i--)
{
Debug.Log("dasbyuidbawuyrbuawyin");
if (HasLine(i))
{
DelLine(i);
RowDown(i);
}
}
}
bool HasLine(int i)
{
for (int j = 0; j< maxX; j++)
{
if (grid[j,i] == null)
{
return false;
Debug.Log("aaaa");
}
}
Debug.Log("aabasuydbvauysedgbuyaa");
return true;
}
void DelLine(int i)
{
for (int j = 0; j < maxX; j++)
{
Destroy(grid[j, i].gameObject);
grid[j, i] = null;
Debug.Log("bbbb");
}
}
void RowDown(int i)
{
for (int k = i; k<maxY; k++)
{
for (int j = 0; j< maxX; j++)
{
if (grid[j,k] != null)
{
grid[j, k - 1] = grid[j, k];
grid[j, k] = null;
grid[j, k - 1].transform.position += new Vector3(0, -1, 0);
Debug.Log("cccc");
}
}
}
}```
this is the line clear code
what is grid?
oh wait
private static int minY = 0;
private static int maxX = 17;
private static int maxY = 22;
private Vector3 expos;
private static Transform[,] grid = new Transform[maxX, maxY];```
{
foreach (Transform children in transform)
{
int arx = Mathf.RoundToInt(children.transform.position.x);
int ary = Mathf.RoundToInt(children.transform.position.y);
grid[arx, ary] = children;
}
}```
ok whats the error
sometimes the line dont delete
and when it happens one time, for the rest of the test it will not work :/
so are you sure in this scenario when the line doesnt delete, both CheckLine() and HasLine() fires? Only DelLine() doesn't work?
Is it DelLine? The place where you delete the line?
yup
well let me check
where do you call CheckLine?
{
transform.position += new Vector3(0, -1, 0);
if (!vMove())
{
transform.position += new Vector3(0, 1, 0);
AddToGrid();
CheckLine();
this.enabled = false;
FindObjectOfType<Spawner>().Spawn();
}
pTime = Time.time;
}```
private int fTime = 1;
Hi how would you go to create a collision of cars against trees on a top down 2d game?
at the moement when the car crashes the tree, it wont bounce back
how can i save the position of an object to a variable in 2D
create a vector 2 variable
i know that but how exactly
like ```public Vector2 savedPos;
then
```savedPos = transform.position;```
okay so did you intend for your maxY to reach an integer of maxY or did you want to to be one less? Like if you define maxY to be 60, did you want 0-60 or 0 to 59?
cos maxY goes from maxY to 0 and maxX from 0 to maxX-1
yes, cuz the next one is the defeat condition
i changed somethings to test
it worked
only one line
then stopped again
im trying to understand why this is happening
can you change Destroy(grid[j, i].gameObject) to Destroy(grid[j, i]);
in DelLine
hmm you didnt do grid.remove anywhere right? no changes to the grid array length?
perhaps do a try{} before the if statement in HasLine and catch (Exception e) { Debug.Log(j); Debug.Log(i); }
The issue is this line for (int i = maxY--; i>=0; i--)
you're changing maxY here
why?
did you mean to write maxY - 1?
You can easily make reverse for loops by autocompleting forr
How to make a simple character selector
Anyone got any experience with the Unity Tile Map?
I created these methods to store the location of collectible items from the tile map (Coins, Keys, Power ups, ect), and then when the player collects them and dies I can re-add the collectibles to the tile map without reloading the scene.
The problem is that no matter what I try this will not work: LevelDataArray[CurrentLevelIndex].CollectableItemTiles.SetTile(keyLocation, KeyTile);
However if I swap this line in, it remove the tiles from the tilemap correctly: LevelDataArray[CurrentLevelIndex].CollectableItemTiles.SetTile(keyLocation, null);
So I know the positions are being collected correctly. I've tried re-assigning the tiles, using normal tiles, refreshing the tilemap.
Never mind, deleting my animated tiles from the asset folder and remaking them fixed this issue. If anyone has any idea why that worked please let me know, cause you have clearly achieved omniscience and I have some questions about the afterlife...
Can you screen show the animator state machine?
at runtime i mean where it's stuck
If you're stuck at the down_idle pose it probably means the exit transition parameter to the blend tree hasn't been set up correctly.
sorry give me a sec, i've got my own project in the back ground i'm looking now
Press play in the unity editor and take another screen shot of the same thing, just to make sure it's your animation that's getting stuck, you should be able to see a blue bar at the bottom of the active state, that shows you how far a long the animation is. Also Press on the arrow that goes towards the blend tree, that way i can see what's supposed to trigger that transition.
I need this bit too
That condition is what tells the animator to changes states, if your animator is stuck it's normally due to that condition.
It's not working cause the value is 0.0
you're check if it's greater and less than
So you had one condition "greater than 0.1" and another condition that was at "less than 0.1"?
so there's a case here where if the value is 0.01 nothing will happen
anyone here can help me with a ranking code
Hello guys, does anyone know how can I rotate a tile from a tilemap by script?
the piece isnt falling here
{
transform.position += new Vector3(0, -1, 0);
if (!vMove())
{
transform.position += new Vector3(0, 1, 0);
AddToGrid();
CheckLine();
this.enabled = false;
FindObjectOfType<Spawner>().Spawn();
}
pTime = Time.time;
}```
the time function is not working
i mean
the fall time
just wondering, does box colliders not work when theres a character animation
@young hinge Animators can be set to "Animate Physics" if you need them to perform the animation updates in FixedUpdate
thanks, but the box collider still isnt working, do you know any other reasons that a boxcollider2d wouldent work?
ok so I have a circlecollider2d on my knob sprite, I have an animation that always plays which just slightly increases and decreases the y size. I also have a movement script and I put the camera in the player so it follows.
also I have the fungus asset
Is the color property on a SpriteRenderer supposed to ignore alpha?
When I set it to Color.clear it turns black instead of going invisible.
I think... it might depend on the material you're using?
Does anyone know how to turn my polygon collider 2d into code? I am new to this
Good lord, I will pay for a solution to this issue I'm having
I am rendering this arrow, and while it looks pretty good, the code is overcomplicated yet still buggy once the path intersects itself.
It stores the cell index of every square that's been selected and decides which directional sprite should be rendered
more info can be found here: https://www.reddit.com/r/INAT/comments/l8a1rm/paid_cunity_programmer_for_2d_rpg_bugfix/
tl;dr: I need to find a simpler way to correctly render the correct directional sprite, even when it intersects itself
whats your issue? @slim jungle
ensure you set the triggerflag on a colider and use that colider as the params for the method
thx but i allready solved it
Hey any good practices for making a top down character?
how do i move my character controller into my script
here is a screenshot
ping me to help
@zinc trout that looks like youve found a public script which references a character controller component
it wont let me drag it in
i know that
i want to drag it in but it wont work
add component>character controller
not sure if character controller is available in 2d but might be
im watching a brackey and he did it but it wont let me
not sure how to help you it should be where i showed you, also if your tutorial is using a character controller i don't see why they would include a rigidbody
it looks more like they've called a character controlling script character controller and that may contain movement and thats whats confusing you by the sounds of it
can i show you the video
welcome to but its 3 am for me so i'm gonna crash soon
oh
Letโs give our player some moves!
โ Check out Skillshare: https://skl.sh/brackeys7
โ Character Controller: https://bit.ly/2MQAkmu
โ Download the Project: https://bit.ly/2KPx7pX
โ Get the Assets: https://bit.ly/2KOkwjt
โฅ Support Brackeys on Patreon: http://patreon.com/brackeys/
ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท...
here
where abouts did he do what you said
@zinc trout he drags the script into the box in the video, however can click the little circle on the right of it to select it
also he seems to do some funky stuff making a character controller and a seperate movement script
but both of those are scripts, character controllers are also a seperate component outside of scripts
however thats not what his referencing there
thanks it work to move it but my character wont move
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public CharacterController2D controller;
public float runSpeed = 40f;
float horizontalMove = 0f;
void Update()
{
horizontalMove = Input.GetAxisRaw("Horizontal") *runSpeed;
}
void FixedUpdate()
{
controller.Move(horizontalMove * Time.fixedDeltaTime, false, false);
}
}```
@silver heron
im not to sure, thats a pretty funky way of doing it without using a traditional character controller
and im off to bed man to late for me to think properly goodluck tho
Hi i have a error in my code but I can't find what it is ! Because i am following a tutoriel and the code is exactly the same :/ but his script is working
this is the code
it's for left and right movement for a platformer
@hallow roost who aer you using
It's ok somebody helped me ^^
ok
the error was that the B had to be lowercased : public Rigidbody2D rb;
Hi who Is specialist with 2D code ?
My code ain't working :/ https://pastebin.com/HnxcY375
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Was wondering if anyone could help me with this? I'm following a tutorial on how to make turn based combat and i keep getting this error. Does anyone know exactly what's wrong? Thanks!
Pastebin.pl is a website where you can store code/text online for a set period of time and share to anybody on earth
Please ignore how scuffed the game looks
the game looks beautiful
Thanks ๐
I'm attempting to render just one object to a camera, with the intention of getting a texture of just that object which I can then map on to a texture to apply visual effects to (think the 'death effects' on an enemy in a JRPG game). I'm having issues however with WorldToScreenPoint vertically offsetting my points. I made a post on the Unity Forums at the following link. If anyone here has any experience with that kind of a process I'd really appreciate your help. Thank you!
I am making a 2D game which has elevation/verticality. What is the recommended way to handle collisions? 3D Collision or Layers?
I'm going the layers route at the moment but I'm not sure if this is what I want. I'm wondering if 3D Collision has more flexibility
Does anyone have any experience with this?
hey im watching this https://www.youtube.com/watch?v=rycsXRO6rpI and im at the animate part but it wont let me animate it im at 4:54
A brief introduction to 2D Character Movement and Character Animation in Unity. We will use a Sprite Sheet with Animator Controller to animate our 2D Character, and we will use some Scripting to change his position by pressing the Arrow Keys. Topics like Sprite Sheet, State Machine and Animation Transition will be cover along the way.
Are you i...
ping me to help
How can anyone help with that. lol
this broke help
oh, i didn't see the message above the vid
Statement still stands
@zinc trout Hey there, could you please tell us more about the specific problem youโre facing, and more about what youโre trying to accomplish? Itll help you receive some better feedback and assistance sooner, since right now we dont really know enough to help
Quick question, does anyone know what type of gameobjects would use win/game over screens? I was thinking it would be UI but I could be wrong.
I am using Unity c#. I want to get a game objects x position value and make a int value = to the x value of the gameobject how would I do this? I haven't tried anything because I don't know what to do
how to make 3d in 2d pixel
yeah
3d in 2d
like some retro games have 3d feel in 2d games
2d in 2d
no no no
3d style in 2d
2d style in 2d
ohh
you are asking a question
oops
I thought you were answering my question
nvm
LOL sorry
yeah
I am using Unity c#. I want to get a game objects x position value and make a int value = to the x value of the gameobject how would I do this? I haven't tried anything because I don't know what to do
How to make 3d in 2d pixel
like this https://www.lexaloffle.com/bbs/?pid=85778#p
gameObject.transform.position.x
int x = Mathf.RoundToInt(gameObject.transform.position.x);
If you want it as an int
You mean 2.5D?
Hi! I'm having issues with instantiated objects not triggering events like OnTriggerEnter2D or OnCollisionEnter2D
for example, i instantiate projectiles when the player shoots. I check if they collide with an enemy and that works fine, they get destroyed and deal damage, but if i check if they collide with a solid, they go through it and ignore the check.
They go through walls even though i have a Box Collider 2D on them.
Also, i have a pressure plate the player can step on to activate a door. It works fine when the player steps on it, but when a clone does it, it does not work.
Note that i use tags for OnTriggerEnter2D/OnCollisionEnter2D, and i've set them up properly, so the player and his clone have the same tag so they should work the same with the pressure plate
does at least one of the objects being checked against have a rigid body, both OnCollisionEnter and OnTriggerEnter 2D require at least one of the objects having a 2D rigidbody to register
I didnt know that, damn
Can i make them kinematic? i don't want gravity to be applied to them
i think you can freeze the y position to stop gravity, yea no you canโt make it kinematic as itโll stop the callbacks to the functions
I think you meant 2.5D look it up
i have that
proof?
and i have colliders on both objects as well as rigidbodys, and the object with that code has "is trigger" on
WHY won't it work.......
@tropic inlet
I want my player to be affected by tilemap colliders, but I also want it to be kinematic so only my movement script can move it. Is this possible?
WHY???
calm down bro
why are u electronically yelling at me
smh
I didn't know you could check for tags with gameObject.tag. Doesn't it have to be gameObject.CompareTag("tag")?
i don't have all day!
!!!!!!!!!!!!!
@tropic inlet
Obviously, I don't know how to solve it.
@empty coral Where are those called, because your checking the same parameters most likely OnTriggerExit isnt written to work with your setup
WDYM
@empty coral Where do you call those functions
in the gem script, gem has collider is trigger
what checks for collisions
is your object isKinematic?
no, just no gravity
do col.CompareTag("Player")
it doesn't even print anything
and it still won't work...
well because you cant print a comparison like that
you should leave the debug as is
but only change the conditional statements
even just a text debug won't show up...
what are the bodytypes of the player and collision's rigidbodys
send a ss of the entire class not just the snippet also
dynamic
Should you not be handling the triggers on the player?
are you sure
i looked up another script with collision working, should it be private?
Do you understand what those modifiers do
Functions are already private by default. You don't need to explicitly specify it.
ok
but why on earth won't it work!??!?!?!
try handling the collision on the player who has a rigidbody, give the object a collider but not rigidbody
witch one musn't have a rigidbody?
the gem i believe
wait, ok i'll make the player have the trigger and send data to the gem after collision
sure
nb
and it's broken again...
i only added a piece of code that adds the score to the player script
GameObject.Find("Player").GetComponent<playerController>().points += pointS;```
that doesn't seem to be the problem tho...
oh YEAH
NVM
i have question how i can code stuff spawn on top of screen and if it touch for example square it gives score and dissapper ?
So I have this code that's half way done that will allow me to move from square to square like in a rouge like using cubes. When i launch unity ilk show you what I have but I need help finishing the rest
the commented out code doesnt work and i dont know why
more commented out code that doesn't work
as i said its half done and i dont know how to make it complete
i think i want move clicks to move the player rn but yeah
ok was my problem that i wasnt using using Vector2 = UnityEngine.Vector2;
either way
what code do i need to get it to move from one box to another
Do you guys have any good course/tutorial for 2d gaming for someone who is cs major? I dont want to spend time on fundamentals but I know I have to look at them a little at least. So I'm looking for something like unity in 2hrs like Derek Banas videos.
hmmmm
there are a good few
depends on what you are looking for
most of the time if you are looking for inspiration for something spefic just google exactly that and you can find it
not simple
like if you know what you are looking to do and just need a shove just google it
@ionic halo got you a second to help im using 3d cubes in the 2d engine and i want to move between them with the player cube that i got going on, i have it done a bit but idk how to do the rest
idk if you can help though you are the one asking for a tutorial
lol probably im not bro :( but thanks for suggestion
is there something i can help you with maybe
finding a tutorial
or you got it
so i found this code in a wiki style of stuff online i put it in a paste bin here
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
now i what i want to know is
will this work if i use it in the game as is, also how would i change it to work with the square tiles i have
or does it not work if i have 3d cubes in a 2d plane
idk if this is what i need though
wait it doesnt work as is i need to figure out howto use it
it says the reference to player is missing idk where to put it
ok i got it to work i think this is fine for now
just gotta adjust some cords
usually with two nested for loops
one loop for x coordinates, and one loop for y coordinates inside that
Then just place a cube at each x/y position
Hello there, I am currently working on a 2d pixel perfect game that uses TextMeshPro's inLineSprite feature, but I am struggling to get the sprites pixel perfect as well as maintain a correct line height
This is the one without the pixel correction
Test Text <sprite="Beverages" index=1> More test Text
By adding a <size> override I am able to maintain the pixel perfectness however the size adjust messes the line height
Test Text <size=32><sprite="Beverages" index=1></size> More test Text
hey how to get my mouse pos?
Input.mousePosition
Camera.ScreenToWorldPoint?
Camera?
Input.mousePosition gives you the mouse position on the screen
In screen pixel coordinates
If you want to know where that's "pointing to" in the game world
You can use a raycast
then why we use Camera world point
To convert it yo a world space position
i want to find angle to rotate my weapon
But that gives you a point very near the camera, not a point near the action of your game
Your weapon is on the xy plane?
yeah
var xyPlane = new Plane(Vector3.back, 0);
thanks
Ray ray = myCamera.ScreenPointToRay(Inpit.mousePosition);
xyPlane.Raycast(ray, out float enter);
Vector3 worldPosition = ray.GetPoint(enter);
Sorry typing on my phone
no problem
Vector3 mousePosition = Input.mousePosition;
Vector3 aimDirection = (mousePosition - transform.position).normalized;
float angle = Mathf.Atan2(aimDirection.y, aimDirection.x) * Mathf.Rad2Deg;
weaponArm.eulerAngles = new Vector3(0, 0, angle);
So now you can have your weapon point at that position
i am doing this
That doesn't work because you're comparing your weapon's workd space position to the gun's screen space position
Replace mouse position from your code with the Vector3 produced by my code
And it should work
how i use Camer in this code?
cannot convert from 'UnityEngine.Camera' to 'UnityEngine.Camera.MonoOrStereoscopicEye' [Assembly-CSharp?
Vector3 mousePosition = Camera.ScreenToWorldPoint(Input.mousePosition, Camera.main);
Camera.main.Screen...
Too vague
Vector3 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
Vector3 aimDirection = (mousePosition - transform.position).normalized;
float angle = Mathf.Atan2(aimDirection.y, aimDirection.x) * Mathf.Rad2Deg;
weaponArm.eulerAngles = new Vector3(0, 0, angle);
i am trying this
And whatโs wrong?
evert thing got inverse when my player move?
Too vague
?
Did you just ignore everything I said above?
LOL sorry
i dont wanna use Ray
Why
IDK
Lol
XD
Ok I'm going to sleep now bye
aah i see
why everything got flipped
i am using Flip()
on my player
Hey if anyone facing same problem this is what i did
Vector3 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
mousePosition.z = 0f;
Vector3 aimDirection = (mousePosition - transform.position).normalized;
float angle = Mathf.Atan2(aimDirection.y, aimDirection.x) * Mathf.Rad2Deg;
if(isFacingRight == true) {
weaponArm.eulerAngles = new Vector3(0, 0, angle);
} else if(isFacingRight == false) {
weaponArm.eulerAngles = new Vector3(0, 0, 180 + angle);
}
:D
i have a clicker and i want to make like 50 things that can happen ( get attacked, find some things) and that every 30 clicks
how can i do that?
i dont have any idea and dont find tutorials
its just a button to click and after 20 clicks one of the things happen
how can i make an object rotate its Y based on the curcor
but only if the rotation is 180 or 0
?
how can i save the position of the cursor in a variable
Vector3 mousePosition = Input.mousePosition;
If there is someone experienced with tilemaps, what would be the best way to place 4 million tiles? SetTile loop takes me about 2 minutes, and im not sure abt settilesblock
I have an animation and I check for collision, but when I go through the collision it triggers twice
could this be related to the animation (in frames) the object has?
What method are you using for detection? @fallen narwhal
Does your object have multiple colliders? (Including children of the object)
How do I get a camera to follow a 2d spaceship's rotate?.
-
When I attach the main camera on the player ship, it rotates and moves with the player, but it is forced into the center of the screen.
-
I tried to create a very simple player scrip, but it only translates the x/y movements and does not rotate.
Is there a way to follow the relative rotation of the focused entity and put it into the camera?
but I do not know where they could arise . the function code is below, all the checks I did have already been done
hey therem i need some help with my 2d sword, when i turn around the sword just disapperes m how can i fix this ?
edit : my sword is in a difrante sprite from my character.
this is my movement code
nvm i fixed it, the sword was -90z in the position
yes, a box collider and circle collider. i will be looking into this to only detect collision on the box collider, do you think thats a solution?
Posted this the other day but trying again as I'm still stuck. Could use any help that anyone can give! Thank you!!
Hi does anybody know how to make a empty object rotate directions with my player?
My player can already rotate so I put the empty as his chield because it's a firepoint. but when the player rotate the firepoint don't rotate at all
your source rect's y coordinate is inverted. 0,0 is top left, whereas your other coords are in pixel space (bottom left = 0,0)
try this:
var width = Mathf.RoundToInt(screenBottomRight.x - screenBottomLeft.x);
var height = Mathf.RoundToInt(screenTopRight.y - screenBottomRight.y);
var srcx = screenBottomLeft.x;
var srcy = Screen.height - screenTopRight.y;
Texture2D finalTexture = new Texture2D(width, height, TextureFormat.RGBA32, false);
finalTexture.ReadPixels(new Rect(srcx, srcy, width, height), 0, 0, false);
OMG that was completely it. I totally missed that, thank you so much!
When I try to make the ball bounce
it get stuck in the top
if (other.gameObject.name == "Plafond") {
transform.Translate(Vector3.down * Time.deltaTime * speed);
}
I tried to do this
@hollow agate put Debug.Log("We hit the top box")'; inside of your if statement to make sure it's actually getting called?
See if you're getting to that point to begin with
It does get called
I tested with a print
It prints when the ball hits the top
@stone siren
OH
wait a second here.
You're running a transform.translate but not on the game object itself
put other.transform
I want the ball to move, not the wall?
What you're doing ios doing transform.translate etc on no object at all, you need to add the object you just checked for (plafond) and run the method on it
Is Plafond your ball?
what is the object your ball is named? (The variable you've used)
Circle
so call transform.translate on circle there
(circle.transform.translate etc etc etc )
it doesnt see Circle tho for some reason
You may need to show more of your code ๐
public class MouvementBall : MonoBehaviour
{
// Start is called before the first frame update
public int speed = 1;
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.position = transform.position + (new Vector3(0, 1, 0) * (Time.deltaTime * speed));
}
private void OnCollisionEnter2D(Collision2D other)
{
//print(other.gameObject.name);
if (other.gameObject.name == "MurDroit") {
UnityEditor.EditorApplication.isPlaying = false;
print("Player one win");
}
if (other.gameObject.name == "MurGauche") {
UnityEditor.EditorApplication.isPlaying = false;
print("Player two win");
}
if (other.gameObject.name == "Plafond") {
transform.Translate(Vector3.down * Time.deltaTime * speed);
}
if (other.gameObject.name == "Plancher") {
transform.Translate(Vector3.up * Time.deltaTime * speed);
}
}
my whole script
Is this attached to your ball or the walls?
Ball
Ok try doing this.transform
does the same shit
if you want I can screen share
maybe I am doing something wrong in unity xD
I'm a beginner myself with C# but what it looks like you're doing is seeing if the walls are colliding with the ball, rather than the ball colliding with the walls? if that makes sense
Well, let me think about what you've got here for a moment lol ๐
ayt
hello i wanna shoot but i dont know how to do could you help me please?
if you wanna help you can write from direct message ๐
Can you clarify what you mean, and tell us a bit more about what you're looking for? "Shoot" is a bit vague
When using the 2D Tilemap, can you have specific tile types spawn various objects at runtime?
with the 2d extras package you got something called rule tile which you can script https://docs.unity3d.com/Packages/com.unity.2d.tilemap.extras@1.6/manual/CustomRulesForRuleTile.html
if not using that you gonna have to memorize the array somewhere and mark each tile you want with script using the int coordinate
Any of you ever use AABB collisions? Isn't physics a bit overkill for a lot of games?
Nothing gets printed to the console whrn I click on objects
Have you tried Debug.log()
maybe it's not hitting anything?
I'm still unclear on the diffrences, but would Debug.LogFormat be more appropriate?
not sure sorry ๐
@peak stirrup maybe object is too far from screen projection. try to increase 100.0f to a bigger value ?
Also make sure script is attached to a gameobject in the hierarchy (even an empty one)
And that your main camera really has that tag
I increased the thing to 2000, still doesn't work, It is attached to the main camera
alright, please Debug.log just before the hit.transform != null line
still nothing
ok thanks
You'll get another error, but you should be able to find that one ๐
you don't guess ?
RaycastHit2D
I did that
but ray is giving me an error
It says cannot convert type Ray to Vector2
yeah use the ray x and y to build a new vector2
strange, in 3d you don't need to, you can use Rays ๐
anyway, should be good then
Should I just find the position of the mouse and use that?
with Input.GetAxisRaw("Horizontal");
yeah that's the Ray
no, you already did it
Physics2D.Raycast(origin, Vector2.zero);
with origin Vector2 origin = new Vector2(ray.x, ray.y);
Sorry I gave it backwards haha
๐
thank you
the variable hit has an error and I don't know how to fix that, I'm pretty sure it's because it's never assigned any value.
yeah assign to hit the result of the Raycast I didn't write all the code, you have to glue it where it makes sense
ok
I did that and there are no errors but it still doesn't work
Do i have to set hit equal to the position of the object being hit?
hit is a null variable there, it will not be equal to the raycast you make
RaycastHit2D hit = Physics2D.Raycast......
if (hit)
{
//do something with hit
}
ok
Your discord state says youโve been playing aseprite for 5 hours
it's open in the background
It still doesn't work
Does it need to hit a colider or just the object?
still doesn't work
you messed origin value
Input.mousePopsition is in screen space
you need to cast a ray from camera with it
you had id okay earlier
it*
This is taking too much time :p copy paste code here if that still doesn't work, we will fix it for you this time
I got it to work
awesome ๐
Thanks so much for the help!
You're welcome, have fun
Does anyone know how I can set the name of an individual tile in a tilemap through script? Tile.name = "something" doesn't work because it sets the name of the tile itself. I want to change the name of an individual.
I think you canโt, maybe make a class inheriting from tile with a string
Like cs public class MyTile : Tile { public string otherName; }
Anyway why do you want to change the name?
Because the system I have for placing and removing blocks revolves around differentiating between individual tiles
wait no
@dense flame how would I make that class apply to all tiles? I'm usually don't work with custom classes
its giving me a nullRef when i try to set the otherName of a random tile
Search for scriptable tiles
scriptable tiles apply to every tile of a certain type
i want to store data in an individual one
@dense flame I want a non global parallel to scriptable tiles, does that exist?
Sorry I am not an expert on those things
๐
Did you consider an enum ?
@golden fox
public enum TileType {
ROCK,
GRASS,
AIR,
WATER
}
Good evening everyone !
I have a little problem with my project, can I ask for help here?
Would you recommend rb.velocity = [value] or rb.addForce() ?
They are essentially the same thing honestly. If you already know the value you want to set it to, go ahead and use the first one. If you want Unity to do the math, do the second one, but be aware of all the various ForceModes and what they do.
Ok
hey, can someone help me?
sorry
so, i cant put 2d collision on objects, put tile collision on an object and 2d collision on the character, but it's not working
a script and animation
the object is stopped
ok thanks
I have a problem with my character's life, when I run the game or want to inflict damage on myself, or get attacked, I get this error in the console
You neglected to assign a value to something
on line 35 of that file - you are trying to access that value which was never assigned
Okay, but how do you find out what this thing is? It can be an object like a script, right?
yes...
first place to start would be to look at line 35 of your code
deduce what could possibly be null on that line
it has to be something you are dereferencing - e.g. something you are reading/writing a value from or calling a method on.
so something on the left side of the dot on a something.something statement
Ok so it's healthBar
healthBar is null
where in your code do you assign a value to healthBar?
In this script ?
Yep
so
see how it says "None"
that means it's null
you need to drag your health bar into that slot
so find your health bar in the hierarchy window
and drag that object into this Health Bar slot from that screenshot
If I drag a prefabs from my health bar, does that make a difference?
Yes it makes a difference
So the health bar is something that doesn't exist in the scene yet?
It's a prefab that gets instantiated?
(or part of one)
And what about "Death Zone"? Is that part of a prefab, or is it in the scene at the start?
In reality it is that of the scene that I rendered in prefab
DeathZone is a prefab for another level
If I modify a prefab, will it be modified in all my scenes?
Alright, great thanks a lot for your help!
np
Hmm .. I have another prefab to which I would like to add a reference but when I want to select the object, I see nothing .. (the object is also a prefab)
Having a bit of a weird issue here with my project.
When trying to make a level finish system using a trigger block at the end of the level and using the Scene Manager to do it, it won't work as intended. It just stays at the initial level with no player character in sight. Additionally, in the Hierarchy I can see Level 1 flickering between loaded and not loaded twice over.
My code is basically checking for the 2D trigger collision then checking to see which trigger was hit (because i have enemies and coins to check as well). However, for the end trigger I am using a tag to check seeing as I have multiple end blocks. I am not sure why it is doing this behavior. If I need to post my code, I will do so if asked.
Thanks for any help you can provide ๐
I will also post a video of the issue on Unity if needed/requested
This problem has happened to me before, and I had unwittingly put two "Next level", check if you did not do that
I am sure that I have not put two of the same level in the code or build settings. There are two distinct levels in the build settings at the moment.
I have also checked multiple times that the player does not spawn in a trigger block.
I don't speak french if you couldn't already tell... but yes I will post a video.
No worries haha, I'm guessing you're google translating most of your messgaes?
Yes 
@trim cairn here is what happens when I press play in the unity editor.
you might notice that it looks like the world's hardest game, this is intentional. lol
I can supply the code in the PlayerController script if needed.
Yes it looks very complicated haha! You probably forgot to put your scenes in the build settings
No I have my scenes in building settings
@trim cairn Base level is just a test level that I have made to make sure that this concept works.
This is why I feel as though this is some sort of bug with the unity version I am using (i did not update from 1.4.f1 yet)
BaseLevel it's first level ?
The level I load first is Level 1 (the start of the game), BaseLevel would be loaded after the trigger of a finish block from level 1
Ok, i can see your code and your trigger block inspector ?
Yes, let me get the screenshot & pastebin link
Ok
@trim cairn
Okay, code is here: https://pastebin.com/2kvP6dP5
The screenshot here is the inspector tab of the finish block on the top left of the right hand side green area.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
ignore the pastebin name lol
A) To differentiate the edge of the box with the inside of the box
B) I handle everything from the PlayerController mentioned before, which is stored on the Player.
I did the box colliders that way to make edge collision more precise
And for the player to actually be able to move because if the whole thing was a box collider the player would get stuck
Okay, I personally use a script for this, so I'm not sure exactly what this might come from .. sorry :/
I thought the way that I did it would work perfectly but I'm not entirely sure where it failed
Do you have a box collider on your player?
Yes.
It may be because of this, if your code is on your player and it has a box collider
private void OnTriggerEnter2D(Collider2D collision)
{
if(collision.name == enemyCol.name)
{
transform.position = spawnPoint.position;
}
if(collision.name == coinCol.name)
{
coinCount++;
coin.SetActive(false);
}
if(collision.CompareTag("Finish"))
{
levelNumber++;
SceneManager.LoadScene(levelNumber);
}
}
the thing is enemy and coin collision was working fine
but i had to do the tag for the finish because there were multiple end blocks that the player could hit
Mmh, okay sorry but I won't tell you where it came from (I'm still learning)
:/
Hey did you look at the 2d collision matrix in Physics2D settings? Just one of the things I always check
Tags and layers are useful for that stuff
Hmm ill check to make sure to see if i spot something out of the ordinary but i never tampered with it in the first place
@still tendon am i missing something here because this looks normal to me
Anyone know good tutorials for making monsters and a health bar?
i saw one i liked for health bars
i don't even remember what it was called. . .
Anyway, searching "Unity healthbar tutorial" would probably yield satisfactory results
How to control the sound? For example, I have entered from the open environment to the closed environment, so the sound of rain should be less and return to the original state when I return to that environment. :)
What codes are used for it ? (2D)
I wanted to use some code related to motion and physics, but I said to myself maybe you can suggest better codes. (cods C#)
Can somebody link something on how to make procedurally generated terrain?
like this?
yes
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
nvm I found something
Hello guys i have a small problem
can anyone help me?
i have 2 objects. i Instantiate obj1 from obj2. how can i know, who made obj1?
i mean is there anyway how to detect the make of an object?
when you instantiate you could put a var in the think you made
GameObject maker
when you instantiate:
newThing.maker = this
after you made it
thanks i solved it ^^
woo
^^
what is wrong in this:
if(GameObject.FindGameObjectsWithTag(TagCard) == null)
{
print("there is no Card on Top of me ");
isFull = false;
}
what's the error/issue?
whats Tag?
it shows me this if(GameObject.FindGameObjectsWithTag(TagCard) == null)
this line
it is
i tried to print it
and it shows Null
XD
what's TagCard?
lemme show u on private
Hey, I have a mistake in one of my scripts, could you help me? I have NPCs that I can chat with, but when I run the game I get this error and I can't figure out where it is coming from.
Script DialogueManager : https://hatebin.com/jukalzglpj
is DisplayNextSentence() getting called before sentences = new Queue<string>();?
I check this
No, sentences = new Queue<string>(); is called in Awake
And DisplayNextSentence() is called when player clicked on next in canvas
Do you have any idea what this can be?
sentences is null
probably wasn't initializated yet
change
if(sentences.Count == 0)
to
if(sentences == null || sentences.Count == 0)
here is a brackeys tutorial for health bar in case your question wasn't answered https://www.youtube.com/watch?v=BLfNP4Sc_iA
Let's create a simple health bar using the Unity UI-system!
Get up to 91% OFF yearly Hostinger Plans: https://hostinger.com/brackeys/
Code: "BRACKEYS"
โ Brackeys Game Jam: https://itch.io/jam/brackeys-3
โ Project Files: https://github.com/Brackeys/Health-Bar
ยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยทยท...
I don't understand the problem, someone can help me ?
Seems like you're trying to parent something to a Prefab
and/or call Destroy() on a prefab
prefabs are not in the scene, so you can't parent things to them
Hm, Yes it is, but the prefab was recorded in this scene that's why it surprises me ..
recorded in this scene?
