#💻┃code-beginner
1 messages · Page 352 of 1
These are the basic building blocks of Unity
that makes a lot of sense tysm
Hi, I currently have used object pool for damage popups and it works. However, how do I have the latest popup be on top (sorted on of previous popups). It's currently fetching a gameobject popup that could be before the current fetched popup, making it render behind.
well that really depends on the nature of these popups
what do you mean?
I mean what I said. What are they made of?
SpriteRenderer?
UI Elements?
Something else?
ok now i have put a setactive on the game object, how do i call that script in this method?
i have put a setactive on the game object
What do you mean by this?
how do i call that script in this method?
You don't need to, I thought you were just going to activate the object?
These are my components
ok so it's a MeshRenderer
so at the start of the count i made the object active
I want to activate the object at a certain time. its like a countdown before youre about to lose
you would either use this #💻┃code-beginner message or physical distance to the camera
Textmesh pro yes
Activate it when you're about to lose instead of at the start
no but the lose condition is in another script
and im activating when the countdown starts
not when the game starts
I really don't understand what you're talking about
Are you confusing activating the timer with showing the timer UI?
Your question isn't clear to me, nor how your game is supposed to work
my bad
Ok, so when I get the object from my ObjectPool, I need to set the current Order in Layer + 1, is that right?
guys I amade domain expansion and I feel it coming
Question: for a scrollbar, how am I supposed to change a variable which is in a different scene from the scrollbar?
Well forget about the slider/scrollbar for a second
This is just a question of "how do I get a reference to a script in another scene"
The answer is through any means you wish basically, except direct inspector references
that's the only thing you can't do.
Everything else is fair game
Singletons, FindWithTag
etc
can I make a script where it calls the variable I need from another script than attatch it for the scrollbar?
You can do whatever you'd like, sure
alr tnx
ok so thgis is my countdown, and i want to call it in the checkGameOver, because it is the death countdown
Initially, 1 * Time.DeltaTime should just be reduced to Time.DeltaTime
1 times any number is the same number
oops your right
So Time.DeltaTime times 1 is Time.DeltaTimes
but do u know how to call that countdown in the checkGameOver method
And there are mismatched brackets here btw
If a function returns an IEnumerator value, then you should call it using StartCoroutine(FunctionThatReturnsIEnumerator())
But I don't know why it returns an ienumerator
CheckGameOver sounds like something that maybe shouldn't need to take 5 seconds of ienumeration
Also, StartCount is never used
to be honest i watched a tutorial
Either the tutorial or your copying skills are bad.
To call the countdown, use StartCoroutine(YourCoroutine());
what is your coroutine
Your coroutine, not mine
is it literally a function called "YourCoroutine" or is my coroutine StartCountdown
Well, you don't have a method called YourCoroutine. This is the Coroutine you want to call.
Which you should know more about than me
i dont bc i suck bruh
I recommend you focus on fundamentals, like coding fundamentals (for-loop, while-loop, if-else statmeents), and Unity fundamentals (GameObject vs Transform, Rigidbody, learning transform.translate and rigidbody.move, gameObject.destroy, and more.
If you start off past your depth by following tutorials, you'll probably remain confused for a while because you're a few layers deeper than where learning can occur more efficiently.
Once you understand C# syntax and Unity engine basics, you can start messing with more advanced topics and retaining more information
ill check those out thanks
how 2 make self-deleting client?
Hello, I need help with animation. I got two things. A fireball and explosion. How do i call the explosion after fireball animation?
use an animation event
Thx for this.
Didnt know about this freature.
my character keeps clipping through steep terrain, and I have been told it's probably something to do with my script not checking for collisions before moving or doesn't check physics, not sure how to fix it from there
you are mixing rigidbody and transform movement/rotation. If you want to use physics then you should only use rigidbody methods
ok so I am still not sure where to go
does my code need changing or some properties from the character
use rb.movebody
rather than transform.position += ...
also having your character move that fast will probably cause issues
are you using rigidbody or charactercontroller
rigidbody
do I replace this as well
yuh
smth like this
this is in fixedupdate
MovePosition moves the Rigidbody to the position, specified in the 1st parameter. It doesn't increase or decrease it by the value. The 1st parameter should include the previous position added to the value
well this is what I did
what do I add
Have you both seen the code provided by uldynia and read my explanation?
trying something like that gives me an error
the value should be added to the position
Well, of course, your variables aren't the same as theirs, are they?
ok I don't actually know how to get the previous position, the game is for school and my teacher didn't go over that much c# before giving us the assignment
? you just add your movement vector to your position
its like
setting transform.position = value
"Previous position" can also be meant as the "current position", which is the position before assigning it to the "new one"
Basically the transform.position in the current frame
ok I changed it to this
m_rigidBody.MovePosition(m_rigidBody.position + transform.forward * m_currentV * m_moveSpeed * Time.deltaTime);
and this
m_rigidBody.MovePosition(m_rigidBody.position + m_currentDirection * m_moveSpeed * Time.deltaTime);
I don't think it's right but it doesn't give an error
I don't feel a difference between my first code and that code
if its still causing issues i have a crude solution
ok then
It doesn't matter. deltaTime returns fixedDeltaTime when called in FixedUpdate
change this to 100
oh pretty goated
i thought it was different
I also thought some time ago 😉
Is it causing the issues?
Is the player not being moved?
ok I changed default max depenetration velocity to 100 and slowed down the player and it works mostly
but the player does move
I think my terrain is a bit too steep too
but thanks guys!
Why would you change that?
also what even is that
displaces the player faster
The maximum default velocity needed to move a Rigidbody's collider out of another collider's surface penetration. Must be positive.
Do you need that?
Note: Very large values can introduce instability during collision detection; too small values might cause the collider depenetration to fail.
well if I find any other collision issues then I might have to change it
but I think it will be fine
Just don't change the default value in the Project Settings
Leave it 10.
what do you mean instability during collision detection
the only bad thing is that if your player collides with a barrel or smth the barrel will fly away much more
How can I fix my sprite from activating the jump animation while standing on an edge
I’m guessing it’s because you set the jump animation whenever the sprite isn’t grounded so just change the logic for either the ground check or the animation
Alright thanks
Anyone able to provide a basic explanation on why i am unable to use the new input system to move an ingame cursor using the mouse pointer and a gamepad's right stick?
maybe im just dumb!
Not without any code or vague insight into your settings
I've got code that allows a UI to be enabled whenever a trigger is triggered and the key J is hit. However, it works randomly and does not work ever time I hit "J". https://hastebin.com/share/fatohehuve.csharp
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
try taking out of fixedupdate see if that works if not , add some logging statements that get called when you press the button
i cant see anything from just a quick glance
make sure the player is near the merchant bool is true when you press J
This I know is true due to a public variable. I can send some screenshots if that helps?
add a
else
{
Debug.LogError("Player is not near merchant!");
}
i dont mind helping
Testing for Input in FixedUpdate is not a good plan
Ah, okay. I removed that though, but it doesn't seem to have fixed the issue
thats what i thought , which is why i said move to a normal void Update()
when you change your code it might help if you reposted it. We cannot help you if we are working with outdated code
Makes sense, mb one sec.
Also heres the relevant screenshot of my cursor controller that im trying to get to work using the new input system
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
It looks fine to me , id just make sure to add lots of Debug.LogError("message to log");
in some else statments below your if statments to log when the opposite of what you want to happen happens
no, you didn't need to move the whole method to update, just the Input checks
the rule is
Update -> Check Input
FixedUpdate ->Consume whats been set in Update
So that would be for my movement input too right? In update?
what is the purpose of doing FixedUpdate at all?
yes, anything that affects the rigidbody
the rest can stay in Update
i honestly dont know!
i usually use Update() if im running timers or something
Anything to do with Physics should be in FixedUpdate, if it is not it can give unwanted issues
ahh thats why i rarely use it lol , i dont use physics really
What about my rbG = ...? Should this be in update or fixed?
i guess it would depend how many times you want it to run per frame
update, it's only when you set physices it should be in Fixed, reading it in Update is fine
bracket 0 bracket
you mean the brackets?
I meant what's in the brackets
that will be the number zero
looks like a 0
I thought it was the theta symbol
that would basically for example you can access the first element of an array
thank you though :)
no, that would be strange to use as an indexer
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
The debug statement on line 104 appears
But the actual UI does not
do you have any errors?
are you setting it to false somewhere else right after/same time
i do stuff like store a list of something and then ill create a method to get the IndexOf(item) to get the index then i can do the opposite to get the item again by doing listToAccess[indexfrombefore]
OK, so it is appearing, but I guess for only a split second
combine this with saving and loading its nice
For some reason, it appears and dissapears instantly
read and weep
if (Input.GetKeyDown(KeyCode.J) && isPlayerNearMerchant)
{
merchantUI.SetActive(true); // Player entering Merchant UI
Debug.Log("WOKRS YESSSS");
}
if (Input.GetKeyDown(KeyCode.J) && isPlayerNearMerchant && merchantUI.activeSelf == true)
{
merchantUI.SetActive(false); // Player exiting Merchant UI
}
put a debug.log line 109 after setting it false, see if thats running
Yeah, I did. That's how I figured that out.
I've noticed some games are able to make it so that If I click a button, it opens until I click it again.
How could I do this?
add an else statement
would someone be able to help me figure out what these errors are cause by and how i can fix them?
theres that in 2 different classes, you need to make it pick just 1
or
if (Input.GetKeyDown(KeyCode.J) && isPlayerNearMerchant)
{
merchantUI.SetActive(!merchantUI.activeSelf); // Player entering Merchant UI
Debug.Log("WOKRS YESSSS");
}
sorry where exactly can i do/change that ;_;
I'll try it. That logic does make sense though.
idk how exactly it goes, but something like using MinAttribute = UnityEngine.MinAttribute; or the other one if htats what you want
It works! Thank you so much for your help!
im an actual dud regarding code xD im only creating a map using assets for my friend rn
so just put that line into the code?
yeah at the top with the other using statements
THANK YOU MY MASTER
you fixed both errors
public void OnPointerEnter(PointerEventData eventData)
{
transform.localPosition += new Vector3(0, hoverOffset, 0);
}
public void OnPointerExit(PointerEventData eventData)
{
transform.localPosition -= new Vector3(0, hoverOffset, 0);
}
How can I move the object while its in a horizontal layout group?
Currently it does not move at all, I assume its the group thats overriding it
you should be moving it by the recttransform
oh
and .anchoredPosition
You won't be able to move anything while the layout group is in control though. Either disable it when moving things, or move a child of the thing you want to move
hi i just have a question
i have 0 knowledge about code and i tried to learn how to code c# for the untiy engine via tutorials but i get stuck in what is known as " tutorial hell" ending up not knowing a how to do to a single thing
so is the first step learning how to code c# through making games or should i learn c# alone first
It'd be good to know the basics of C# first.. like what's a class, type, method, param, variable, accessor, property, field.. etc
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.AI;
public class MonsterMovement : MonoBehaviour {
[SerializeField] private MainManager mainManager;
private Transform playerPosition;
[SerializeField] public NavMeshAgent agent;
[SerializeField] public float baseSpeed = 3.5f;
[SerializeField] public float speedMultiplier = 1.0f;
private void Start() {
mainManager = FindObjectOfType<MainManager>().mainManager;
playerPosition = FindObjectOfType<PlayerMovement>().transform;
agent = GetComponent<NavMeshAgent>();
mainManager.OnGameStart += GameStart;
mainManager.OnFreezeRemove += ResetSpeed;
agent.speed = baseSpeed;
}
private void GameStart() {
InvokeRepeating("UpdateDestination", 0.5f, 0.5f);
StartCoroutine(PassiveSpeedUp());
}
private void UpdateDestination() {
agent.SetDestination(playerPosition.position);
}
private void OnTriggerEnter(Collider other) {
if (other.CompareTag("Player")) {
mainManager.PlayerCaught();
}
}
private IEnumerator PassiveSpeedUp() {
while (speedMultiplier < 2) {
speedMultiplier += 0.2f;
agent.speed = baseSpeed * speedMultiplier;
Debug.Log("SpeedMult: " + speedMultiplier);
yield return new WaitForSeconds(1.0f);
}
Debug.Log("Reached Full Speed");
}
private void ResetSpeed() {
bool flag = false;
if (speedMultiplier < 2) {
flag = true;
}
speedMultiplier = 0f;
agent.speed = baseSpeed;
if (flag) {
StartCoroutine(PassiveSpeedUp());
}
}
}```
Here is my code, I aim to make a npc do a linear speed increase using coroutine, but the script ends up make the speed multiplier bounce around and invokes the log inside multiple times instead of output it once a second. What could be the problem?
the log output looks like this, not sure why the IEnumerator invokes more than once? I have no idea why, I appreciates any help.
Either GameStart() or ResetSpeed() is being called multiple times
hmm I've checked that I used a event system calls OnGameStart event on Start(), and Reset Speed() is only called when player collides to a object which I checked isn't on my test run at all
and the logs go skyrocked 2 seconds since start
uncollapse you're logs, and follow the stack trace... you'll see where things are coming from
but from the code you've shared, only those two places call the coroutine.. so for all we can see, one or both of those two must be getting called multiple times
I found the problem I was checking if the npc is freezed in a update function
I can solve the rest of the problem myself, appreciated for the help
transform.Rotate(Vector3.left * mouseY);
transform.Rotate(Vector3.up * mouseX);```
can we clamp these values?
Not while using that technique
what do you want to clamp exactly?
search "clamp camera" in this discord for examples of how to clamp the rotation of an object
mouseY & mouseX are input values
rotating the transform as you see
so basically I'm trying to clamp them
I can't use Mathf clamp here
why not?
Vector3.up * mouseX is 0,1,0 * mouseX
so you can clamp mouseX
let me try again then
Clamping mouseX doesn't do anything useful
Absolutely, I suspect he wants to clamp the resulting rotation which as @wintry quarry said' you cant get there from here' (sorry for the paraphrase)
typical XY problem
yeah It's not working
'it's not working' is not helpful. Perhaps try saying what you are trying to achieve rather than how you want to achieve it
this is what i did
mouseY = Mathf.Clamp(mouseY, -40f, 40f);
mouseX = Mathf.Clamp(mouseX, -90f, 90f);
transform.Rotate(Vector3.left * mouseY);
transform.Rotate(Vector3.up * mouseX);```
and these are the input values
``` float mouseY = Input.GetAxis("Mouse Y") * mouseSensitivity * Time.deltaTime;
float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity * Time.deltaTime;```
don't multiply mouse input by deltaTime, it is already framerate independent so doing that multiplication just ends up making it stuttery
and that answers my question, how?
do you know what that code does?
Ok so to provide maybe a little more help to what I’m guessing is a language barrier:
You can’t clamp rotation like that because at any given moment -90 == 270, and you can’t always predict which one it will give the value as when reading from a quaternion (transform.rotation) unless you go into a deep rabbit hole of maths
So try and clearly lay out what you want the camera to do and how you expect it to behave because a lot of people have this issue aswell 🙂
oh sorry I was talking to someone else
didn't explain properly
He is not trying to clamp a quaternion
I know exactly what they’re trying to do, and it’s the usual angle tracking issue
what makes you think that mouseX or Y would contain values like the ones you have clamped?
that's why I said clamping with MathF wont work at first
then I tried as you said
Because I answered the question you asked.
Now try answering mine #💻┃code-beginner message
uhh
I'm trying to achieve a clamped rotation
as Im using the rotate function
to rotate as you see,
but mathF wont work here
and the vector ClampMagnitude you showed me requires an offset
I can't understand how am I supposed to achieve the offset using two input values
and also it seems to be used for confining length to a given radius
the problem is you are not understanding.
you want to clamp the result of the Rotate method which, you have been told, you cannot do like that
so
I should try some other rotation method?
Yes and no
maybe someday they'll bother to take my advice
Same method but with some logic in the middle, loads of people have solved this issue so I seriously recommend searching it
yes, get a Vector3 of the rotation in start, manipulate and clamp that then set your rotation to the result
don't hold your breath
I'm looking at everything
Vector4?
Oh lol
typo, fixed
I was about to say not sure how that would be any easier than a quaternion at that point 
but how do i make it?
Disable it
after it dies?
Yes
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
i tried adding but the script still doesn't disable
there's nothing in here that disables the script
it's unclear what other wscripts this is interacting with
i.e. which script is actually handling the input and calling these functions?
that's the one you should be disabling
no idea what that is
Is there any more text in the console? Look at the bottom half.
I think I remember seeing this once...
ah, it's because this is from native code
SUCCEEDED is a macro in windows code that you can use to check if an operationg succeeded
I just got this error when trying to open my html file in my build. Urgent. Trying to submit for Game Jam
the error explains the problem
Your browser will not let a webpage open other files on your computer
using Build and Run will start a web server to play the game for you
alternatively, you can upload it to something like Itch and play it on there
( you can also use any other wweb server you want, including nginx etc)
python -m http.server my mostly beloved
How do i do this?
Sorry if I seem rushy, submission is due in 25mins
before you do that: do you have python installed on your computer?
Yes
you can check by opening Powershell and running python
okay -- go to your built game and shift-right-click an empty spot in explorer
an option to open a powershell window should appear
(or maybe a command prompt window)
The issue is not viewing my game
The issue is the judges viewing the game
If they have to go through all of this, they won't judge it
Uploading it to Itch would make it easy, then
How do i do that without the zip-download method?
Where is that?
you'll have to actually create a project on Itch first
"Kind of project" is one of the settings when creating the project (you can also change it after creation)
zip up the entire build directory and upload it
GOT IT
One issue
How do i change the size?
It's zoomed in
(Don't judge my trash game xD)
Thank you so much!
Im an absolute beginner and have a big problem...
Im trying to learn by doing with Youtube tuto. and I don't know why I can't fill code automatically as shown in the Video. The video also shows that I should use “Assembly-CSharp” as a script. Please help me
!ide
If your IDE is not autocompleting code
or underlining errors, please configure it.
Select one:
• Visual Studio (Installed via Unity Hub)
• Visual Studio (Installed manually)
• VS Code
• JetBrains Rider
• Other/None
!vs
If your IDE is not underlining errors in red or autocompleting code,
please configure it using the link below:
• Visual Studio (Installed via Unity Hub)
• Visual Studio (Installed manually)
configure your VS
after many years in Unity, don't think this has happened before. What is going on here?
private IEnumerator Start()
{
yield return new WaitForFixedUpdate();
endP = target.position;
}
private void OnDrawGizmos()
{
if (Application.isPlaying)
{
Gizmos.color = Color.yellow;
Gizmos.DrawSphere(startP, 0.24f);
Gizmos.color = Color.red;
Gizmos.DrawSphere(endP, 0.24f);
}
}```
Why is the red dot all the way out here?
Presumably that's where endP is
yeah but how?
because you put it there somehow
target.position is the object I have selected
Well is your tool handle position set to Center, or Pivot?
Pivot/Local
Unity 6 bug?
unlikely
So perhaps your object has moved since Start ran, that seems most likely
weird. I also set wait for fixed update just in case
also disabled its agent, same problem
You should probably share more details for us to be able to help you properly.
to be honest, idk what else I could share. I never had such a basic issue before
that's all there is to the code and the scene is basic
why not just use target.position instead of endP ?
For example, the whole code, values assigned in the inspector, hierarchy setup, etc.
I need the Vector3 to do something else on the Navmesh but I can't even get its position correct on Target for some reason
I'm sure that's not the whole code. For starters, we don't see where you assign startP
sure but startP is kinda irrelevant
What is target? Where do you set it?
well at least keep it up to date in Update
I am basically trying to do what Navmesh link does, but placing start/end dynamically instead of scene view
the 'something' method I have commented out in the code sent, it was originally in Start until things went, well weird.
Take a screenshot like that when the issue occurs at runtime.
like this?
With the object selected
you can see the yellow is the Vector3.zero since it has not assigned pos.
The red position, no idea why that is there
curious I'm gonna try this same code on 2022
why is Start a Coroutine? you do know it only runs once
Looks like the B object doesn't have that script on it
Which is the capsule
It's some other object
believe me it was a regular start before, I just did it IEnumerator to hope waiting for a fixed update would do anything
here I have it selected (in playmode)
the object inspector is here #💻┃code-beginner message
Interesting.🤔
Can you draw a debug ray/line from transform position, to the b transform position in update?
sure, a ray or a line ?
Line
well isn't that interesting
And the red gizmo is still far away?
yup
private void Update()
{
Debug.DrawLine(transform.position, target.position);
Debug.DrawLine(transform.position, endP);
}```
hmm let me try to assign endP in update
wtf
private void Update()
{
endP = target.position;
Debug.DrawLine(transform.position, target.position);
Debug.DrawLine(transform.position, endP);
}```
I need to do some fancy stuff with it, mainly NavMesh.SamplePosition etc.
So does it work? I'm not sure how to interpret that "wtf"
oh sorry i thought I sent ss
We need game developers for a game called "Mortal Company" on the playstore made by unity, you should be experienced with coding in unity, you sadly won't be paid yet until the game gets famous.
dm me for more information
not for the gizmo you don't
What if you do it in late update?
!collab
We do not accept job or collab posts on discord.
Please use the forums:
• Commercial Job Seeking
• Commercial Job Offering
• Non Commercial Collaboration
how not? the gizmo runs every OnDrawGizmos no ?
what de hell breh
yes, #📖┃code-of-conduct and dont cross post
ok
The gizmo code shouldn't be working out where to position the transform on the navmesh.. a specific method should be doing that.
The gizmo just needs to use the current position
same issue , with a slight delay now lol
it's not its happening in Update, also tried Late update. OnDrawGizmos just draws a sphere where endP is suppoed to be.
since its back assigned in update , I will try moving target and see what happens
Weird🤔
There must be some simple reason that happens that were missing.
yup.. it appears that way.. i'd walk ur way backwards and test 1 thing at a time until u can figure out what thing causes the odd behaviour
What does it look like of you set pivot mode to center?
I guess, wouldn't change much
with Target selected?
Yes
are we seeing Unity's NavMesh Gizmo's or are these custom Gizmo's
they are simple Gizmos.DrawSphere
and the lines too? soo they're from your method?
same thing
scroll up spawn
pivot at same location
just brain storming.. alot of times theres guys that will draw gizmo's that are different from their logic..
without noticing..
Could try setting Gizmos.matrix = Matrix4x4.Identity before drawing
In case its using some other matrix
not saying thats what u did, but im just throwing out ideas
Maybe the pivot/center mode switching is broken?🤔
ya, im catching up now
it's just a primitive capsule, the pivot is pretty likely fine
same code in unity 2022
on a diff pc so same account sorry
m1nd is my account as well but at work , sorry for confusion lol
Do the gizmos draw in local space?
ohhhh!! we have a spy
oh 😄
haha my job doesn't like me using my personal account
shoulda led with you being navarone... that way we're not making bias'd newbie assumptions
true my bad, I can't believe something so basic is broken 🤔
literally makes me question my Unity knowledge..
There's definitely something fishy
Have you tried resetting unity? Sometimes gizmos just get messed up
mmhmm.. i read thru it all.. i can't see anything wrong
in two different versions at the same time? 😄
worth a shot @rich adder
the problem is the first time I showed on a different pc on Unity 6
now I showed on my pc unity 2022 same code
ohh right right.. nvm
I thought it's drawing differently in those
both are incorrectly drawn, but in different ways
Matrix4x4 doesn't have definition for Identity
oh its lowercase 😛
edit: didn't help though
whats target? just a gameobject reference?
@rocky canyon
for some reason those images are [ ... ] dots
I used unity over 3 years, never seen this before
my discord acting goofy this morning
what gizmo's going crazy?
has to be because drawline is going to the correct spot
wish we had Debug.DrawSphere or whatever
but as you can see
var newObj = new GameObject("Hellothere");
newObj.transform.position = startP;``` I tried this
and it does the same weird shit, when i press F to focus its far away
the Z position is like stuck somehow..
how can i debugg unity on vscode? i tried doezen launch.json but all fails
use debugger
can anyone help me fix this i have no clue why my character phases through the ground
depends how you moving it
my question is gow to use it
wym
show movement code
okay
you just press the Debug button, enable it inside unity and should be ggood to know. No additional setup required
alright thanks
i'll give it a go
Set rigidbody's collision detection mode to continuous
mhm
hmm, i used this code on 2 regular Mono's seems to work fine..
I have another issue, sometimes my sprite gets stuck while moving around
has to be something to do with the navmesh / agents right?
can you show me your lauch.json please?
Does target have a navmesh agent? Or what object
those are Debug.Drawline which work fine , but what about Gizmos.DrawSphere
how to make a timer when the game would start the timer would be 30 seconds and the player has to push the obstacle within 30 seconds if he pushes the obstacle the timer would add 5 seconds and diffrent time in each level i got 3 levels
ohh 1 sec
they did in the first project, not in the second. Same issue
An agent could very well mess with transform.position
create a float and -= by deltaTime in Update
uh sure, where is it ? I dont even mess with it
should be on the root of the project but if you click on the gear it should open it
Oh fuck
im dumb as hell
🥲
consolation, I'm glad my eyes aren't the only ones missing carrots today...
sorry every1
which gear icon. I'm not seeing the file lol
in the screenshot you sent, there is a gear on the right
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Unity",
"type": "vstuc",
"request": "attach"
}
]
}```
this?
yes
yea idk, spheres seem to work fine.. caching endP in Awake()
mate when you post a problem you have to send code too, we cannot guess
Issue was solved 🙂
what was it?
my brain aint braining this morning
lmao.. ohh that issue
yea, they need a fix for that
oh mb
haha!
keep failing 🥲
ik im embarrassed forreals
we all get one of those everyonce in a while 😛
haha yeaaa out of all the problems, this is like noob city 2000
this is my playermovement script
@rich adder since ur here.. do u know how to solve this?
not really broken or anything.. but being used to VStudio I regularly type void out of habit..
just type "start"
but yeah those are because the snippets are a plugin iirc and they already adds the access modifier
its not like "smart snippets" or something
ya, thats my solution too.. but since i still do it 2/5 times i wondered if i could change a setting or something to deal
Should i create ui that would show Time: ?
i had to get used to it myself coming from VS
haha yeah one of the few things that annoys me about vscode but its worth it more than VS mac
i been lately omitting private access modifier
are those tiles?
i have been tryign to make this work for 2h but cant understand why its parsing it to empty strings and 0 numbers...
and cant seem to get the debugger working to check whats wrong..
can anyone help? 🙏🏼
https://codeshare.io/8Xqr0B
mhm
but i guess its better practice to keep them around
i could go and edit the snippets to remove em i guess
they probably need a composite collider or whatever is called
composite
alright thanks
i think you're seeing the infamous ghost collisions
i see
so i added the collider and now the platforms just fall out of the game
it'd be 1 solid collider for each platform..
vs abunch of tile/square colliders.. which controller tend to get stuck on
I think because it automatically adds a rigidbody
but it doesn't mark it as kinematic / static
I think you need RB for composite to work
or static/kinematic
yeah use static
ohh okay.. ya u probably right
the player is irrelevant
well thats fine.. just tick it as not simulated or mark it as static or kinematic like me and nav suggested
when you added composite collider it adds the rigidbody, just mark it as static
(the platform not the player)
where do i do that
static = solid objects in scene that dont move.. (a tree for example)
rigidbody
on the rigidbody
it is called Composite collider 👍
search results make u think it could be called Polygon collider
mark it as not simulated
show the current setup
and leave it non-static
I think you do want simulation just static though
thats what makes it participate in collisions with physics
it just wont move since its "Static"
why his player falling thru i reckon?
rn cause its not simulated
alright ticking simulated fixed it
so its not even part of physics scene
afaik Unity does 2 scenes, one for physics simulations and one for showing the transforms / visuals etc..
thank you both anyway
my 2D scene is set up a little less than useful
i seen a solution for this let me try to find it
seems to be as easy as ticking a box on ur tilemap collider 2d component
ah yes make sure that is ticked
right there
OH
lol.. 👀
happen to me before too no worries on a much bigger scale 😛
<insert t-rex gif>
stand perfectly still, it won't see us.
🦖
laughs in: Vector2
i know i know.. its okay...
no one will know..
🙇🏻♂️
it work?
do you know what might be the issue? im really stuck on it
well you need to start from the top, have you configured the editor properly
updated all the packages etc.
a lot has changed since VSCode and unity was a thing
is there a better lightweight ide for it now?
not really
vscode is as lightweight as you can get imo
are you using the new Unity vscode plugin and the latest Visual Studio Editor package ?
When we type a function its implicity private so for example
void TakeDamage() is the same as private void TakeDamage();
Now, with an interface is it opposite?
namespace SPWN
{
public interface IInteractable
{ void Interact(); } // this is implicitly public??
}```
right
good to know
Need help with the script timer the seconds going so slow and it says 29,9f seconds i want it to only say 30 seconds then 29 seconds and it supposted when player pushes the obstacle the timer would add 5 seconds https://hastebin.com/share/abuyizevep.csharp https://hastebin.com/share/etozupetag.csharp pls help 🙂
vscode plugin: Unity v1.0.1
Visual Studio Code Editor package: 1.2.5
ohh
wrong package
Visual Studio Code Editor needs to be removed
you need Visual Studio Editor
to be at least 2.0.20
i should remove it?
i have it and the Visual Studio Editor: 2.0.22
yes
then show your External Tools page in unity
you should have Vscode selected and have its version shown there
Could someone help me figure out touch input, or at least where to start
touch input is very vague
also now with new input system you got new ways to do it
its pretty easy, the built in Input. already handles a lot automagically
I suggest you look at the new Input system it has better support though for features like Holding key and stuff
somewhere I can read on this?
its the latest
I just use the docs
https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Touch.html
yeah nvm that lol i thought it said VS for a sec
anyway you can untick all those except first two
try Regen Project files
for 2 hours
could be a bug
its a very generic error, doesnt say much
are you on windows or mac?
windows
could be a permission issue
the ports are open on the FW
I think it tries to start like a mini server or somethinglike that
is this the issue ?
https://github.com/microsoft/vscode-dotnettools/issues/875
Closed both VS code unity (this fixes the attachment issue but not when it locks up unity)
try the logging
yeah, but didnt help
yea its weird, we have the same versions it seems but mine works fine
I think only time debugger wast working for me in VScode was back when it was going through old way with disabling modern .net or whatever
back then it was only c# extension and some hail marys
thats the error from the log btw
NullReferenceException: Object reference not set to an instance of an object. niceee
is it from my code? or some configuration?
doubt it, do you attach it while unity simulation is running already ?
tried eiter way
I wonder what its trying to reference
Im gonna chalk it up to OS being dookie. Windows been slipping since 7
ill ask on redit maybe someone know
must be permission related / network
the miniserver or whatever its trying to do with localhost
i think so too but i checked the FW and vscode have all the ports open
This might be a dumb question but how do I read this values?
the documentation for touch input
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
private CharacterController controller;
public float speed = 12f;
Vector3 velocity;
private Vector3 lastPosition = new Vector3(0f,0f,0f);
void Start()
{
controller = GetComponent<CharacterController>();
}
// Update is called once per frame
void Update()
{
float x = Input.GetAxis("Horizontal");
float z = Input.GetAxis("Vertical");
Vector3 move = transform.right * z + transform.forward * -x;
controller.Move(move * speed * Time.deltaTime);
}
}
using System.Collections.Generic;
using UnityEngine;
public class MouseMovement : MonoBehaviour
{
public float mouseSensitivity = 100f;
float yRotation = 0f;
void Start()
{
Cursor.lockState = CursorLockMode.Locked;
}
void Update()
{
float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity;
yRotation += mouseX;
transform.localRotation = Quaternion.Euler(0f, yRotation, 0f);
}
}
Any idea why my character swerves to the sides while going backward? It didn't happen when I was testing it in the preview window but when I did a build it started doing so.
I think the link i've sent them
https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Touch.html
if you click the class it brings you here @dusty shell
https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/api/UnityEngine.InputSystem.Touchscreen.html#UnityEngine_InputSystem_Touchscreen_current
Well one problem is you should not be multiplying mouse input by Time.deltaTime
What should I be doing then?
not multiplying moouse input by Time.deltaTime
You're doing a thing. You should be not doing that thing instead.
Specifically here:
float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity * Time.deltaTime;```
* Time.deltaTime <- backspace on keyboard or highlight and press delete
(you will need to reduce the value of mouseSensitivity in the inspector by a lot to compensate, perhaps down to like 1)
Is there anyone who understand timer scripts?
btw why is forward multipled by X instead of Z
or is your rotations just placed inverted
what is "timer scripts"
I'm not sure honestly, when I followed the tutorial they were inverted so I swapped it around.
They aren't inverted anymore but even after deleting the multiplication it still swerves while going backwards.
here
can you show what you mean by swerve while going backwards
If you don't want any decimal places, don't include them in your number format string
You coming from pygame?
.ToString("0") will just display the whole numbers
you could also cast to int before printing
I'm just going backwards and it's swerving into the wall.
Uh, sec, let me convert that to mp4.
must be mp4 for embed
but how to fix this?
convert it to int?
Show code, if you've done that ToString it shouldn't be doing that
Do you see the issue now? Should I make another video?
hi im using additive scene loading but when i instanciate a object some time it does it to the wrong scene public void PlayParticleEffect(GameObject effectPrefab) { if (effectPrefab != null) { if (effectPrefab == groundSmokePuff) { GameObject effectInstance = Instantiate(effectPrefab, this.transform.position + transform.up * 0.53f, Quaternion.identity); Destroy(effectInstance, effectInstance.GetComponent<ParticleSystem>().main.duration); } else { GameObject effectInstance = Instantiate(effectPrefab, this.transform.position, Quaternion.identity); Destroy(effectInstance, effectInstance.GetComponent<ParticleSystem>().main.duration); } } }
hey guys quick question, for some reason I cant find the save settings button on the player settings tab..
I can change it, but as soon as I rehit the play button, it default back
I am trying to allow unsafe code.
so the one i highlighted should be in the battle scene
Instantiate will instantiate into whichever scene is currently the "Active" scene
https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.GetActiveScene.html
https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.SetActiveScene.html
https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.MoveGameObjectToScene.html
These may be helpful to you^
im still having trouble inserting this countDown method into another script at this same point in time
countDown is not a method. It's a class.
oh yeah
it's unclear what you are trying to do
YOu mean StartCount?
yes
You want to call StartCount?
i do in another class
Do the same thing you did there
you need a reference to the countDown script instance
and then you call StartCount on it
BTW in C# best practice is to name your classes with PascalCase not camelCase
Your current naming causes confusion
got it
same for methods
so you know in a game when youre about to lose, lets say you reach the limit and you dont lose immediately, it gives you like 5 seconds to get below the limit before you lose
thats basically what im doing
I mean it doesn't really matter, we're talking about the basics of referencing and calling methods here
If you want to call a method on a script, you need a reference to an instance of that script, and you call the method on that reference
oh also what do you mean by the same thing i did there
I said:
You want to call StartCount?
and you said:
i do in another class
So I said, do the same thing you are doing in that other class.
You haven't actually explained at all what issue you're having
You just said
im still having trouble inserting this countDown method into another script
But you didn't go into any details about what kind of trouble
Why not just do what you did before
you said you did it once already
Basic primer on references^
how can i make my cam.transform.Translate use the currentZoom for a max and a minimum zoom ????
so its going to the right when you press back?
also can you send the current code via links
also show your character's gizmos/pivots
obligatory use Cinemachine
you sure you want to zoom by moving the camera? Why not just change the FOV?
cause the fov making the zoom look weird
Yup.
how so?
I'm not sure how to do either of those.
How to make when gameOverUI shows the playercontroller script would disable
just select the player that has the script and make sure the arrows are clearly visisble and you have Pivot/Local mode on
Anyway, no you can't clamp with transform.Translate. You would have to change how you're doing it to set the position directly yourself and clamp those positions independently.
or just clamp the position after Translating. Your choice.
use like an event?
You already have the "gameOver UI show "method, the rest is just calling the disable function somehow, directly or via event
like i just want to make the camera nearer from my player beceause its a 3rd person camera game if i zoom with fov it will be weird (already tried it) and i would like to make the camera rotate infront of the direction im zooming in, so if i use fov it will zoom in the horizon and i wont be able to see my player
so if i wanna do what i just above i need cinemachine ?? ☝️
Again what do you mean by "weird"?
no but it will make it way easier
^^ at least for movement and stuff
not sure what changing FOV is doing rn that is "Weird"
You can build a house with your bare hands but it's way easier if you use the right tools.
yeah they keep saying that without an explanation
Is this good?
switch it from Center/Global to Local/Pivot on the top right of scene
have to know what exactly is front/back etc.. on player
it make a real zoom i just want to have the camera near and still see everything, the FOV reduce the FOv so you see futher but everything around you dont see it, idk if i explained well
thats what zooming is though
its how real camera works anyway, you can't zoom easy without increasing the mm of the camera which reduces the "wide" angle you see with lower mm cameras
regardless
just use Cinemachine
Make two virtual cameras with your two desired configurations and switch between them
ok i see, i asked badly what i wanted, it was not a real zoom but make the camera nearer while keeping the wide angle of the camera, anyways ima try the cinemachine stuff ty for the help
yeah two cameras with cinemachine then, each one at your desired distance / fovs
it automagically handles the smoothing, you can adjust that
oof so your forward is transform.right
(ideally should be the blue arrow transform.forward)
also send the current move script via links !code
📃 Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
Both of the scripts fit in a discord message, but if you want I can do that.
my camera only does 4 thing : it is always tilt to the bottom a little like isometric games
- freecam where you can move freely in horizontals axis
- rotate around on y axis
- lock in the player instead of freecam
- "zoom" where you can make the camera nearer or further from the direction the camera facing in
idk if i explained well again but the camera does nearly the same thing as BG3 camera with a sort of isometric camera that you can zoom to make it more like a horizontal camera and still move the camera freely, can i make this with one cinemachine camera you think ?? (cause i switch to cinemachine i could just remake the whole camera system and make it better anyway)
Its easier for me to read than discord, I'm on mobile rn
Sure.
real quick, why is the out RaycastHit hitInfo not working?
onFloor = Physics.Raycast(transform.position, new Vector3(0f, -1f, 0f), playerSize / 2 + 0.25f, out RaycastHit hitInfo);
a powerful website for storing and sharing text and code snippets. completely free and open source.
a powerful website for storing and sharing text and code snippets. completely free and open source.
what does "not working" mean?
define "not working"?
Elaborate on "not working"
hat trick
you put it in the wrong spot
error tells you whats wrong
https://docs.unity3d.com/ScriptReference/Physics.Raycast.html
Your parameters are out of order
outsped 😎
yes, a layermask, from what I see, but I don't need it. What do I write in there, then?
that is not the fourth argument when using the version that provides a RaycastHit
There are multiple overloads, scroll down the page
you will want to look at the one that actually gives you a RaycastHit, yes
could you debug .log move when you go back? I want to see something
works. Thanks mate
onFloor = Physics.Raycast(transform.position, new Vector3(0f, -1f, 0f), out RaycastHit hitInfo, playerSize / 2 + 0.25f);
new Vector3(0f, -1f, 0f) this can just be Vector3.down :p
Hey, beginner developer, just doing my first project, i really enjoyed Database management gui like Navicat, HeidiSQL etc. Im just making a singleplayer game so i don't have any databases. but is there something like these? Create, edit data in like a table? For example items for an RPG game, monsters, weapon damage, level req etc..
like excel ?
Then again it doesn't really happen if I play in the preview window so I'm not sure how helpful this is.
wdym in the preview window
so how could i potentially fix this?
yes
In Unity you'd do that in a more object-oriented way and make Scriptable Objects to define stuff like this.
Nothing prevents you from storing them in a database and reading from it at run-time, though, but there are easier ways
Thats okay, but some program or plugin to see these in a table?
only if you put them in a db otherwise you have to make your own
Nothing built-in
I need some more Help. I am doing this in a 2d game, and I have some walls which have a 2D box collider. It is of proper size and all, the raycast just won't detect it. What could be the issue?
Player Script --> https://hatebin.com/yutphtrkhz
(wall script is empty, unused
Need to use Physics2D for 2D
Physics.Raycast is for 3D
changed to Physics2D. What other changes do I make to this line for it to not give me errors?
first two arguments are correct
go look at examples for Physics2D.Raycast
Look at the documentation, it's a bit different
where is the documentation? Is there a shortcut in visual studio?
you can hover the function it tells you all the signatures
or good ol google
https://docs.unity3d.com/ScriptReference/Physics2D.Raycast.html
This, as opposed to a built exe.
so the issue only occurs in a build ?
Yup.
I'm not sure what changes to make
do you have a controller maybe causing stick drift ? @hallow totem
although i think unity would read controller too
Well, it doesn't use an out param anymore as you can probably notice
It returns the value directly to you
iirc you can directly do
grounded = Physics2D.Raycast etc.
if(grounded!=null)
Nah I'm using a mouse, my only controller isn't even connected.
RaycastHit hitFloor = Physics2D.Raycast(transform.position, new Vector2(0f, -1f), playerSize / 2 + 0.25f);
onFloor = hitFloor != null;
something is very wrong here
Wrong return type
RayacastHit2D
RaycastHit2D*
noone saw that 😛
but really - you can just do cs onFloor = Physics2D.Raycast(...)
you don't need the intermediate variable
RaycastHit2D is implicitly converted to bool.
I need the hit object data
Also how do I check if something was hit? If It's bool, I want it to be the hit object, and onFloor to be whether the object exists or not
onFloor = hitFloor; works
As does onFloor = hitFloor.collider != null;
something strange going on there, I would debug those values during playmode with onscreen debugger or something (in the build)
Please, please look at the documentation and pay attention. It's in the example
make the thing smaller..
whatever detecting when you become grounded be it,
- raycast
- sphere collider
- or w/e
so it doesn't actually become grounded until ur just above the ground..
that should make it so when the anti-gravity effect goes into affect you're about to collide with the ground anyway
How do I set which virtualcam the cinemachine brain is tageting in programming? I want to make sure in multiplayer the camera is following the correct player's cinemachine virtual cam.
the cinemachine cares about priority
nothing to do with multiplayer, that has to do with who controls the owner of cam
Is there an easy way to display the debug information on screen?
each player has their own cinemachine brain
Probably Text Mesh Pro UI Text
would be the quickest and "dirty" way
probably overkill rn though, you just need to debug the move values and see if its the one causing movement
So if I raise the priority of the cinemachine they control and don't make that variable spread to other players then it'll follow then it'll follow the correct one? I'll try that. Sorry this netcode stuff melts my brain it's hard.
change their priorities or enable/disable them
in multiplayer there is no good reason to even have virtual cameras following the other players unless you have some kind of feature that you want to follow other players sometimes
each copy of the Client handles their own virtual camera, so not sure why you want to even do that
Often, you should destroy such extra cameras as part of the initialization of "other player" objects
are you Instantiating the players with their own cams ?
cause yea you would have to delete it if its IsOwner == false
The virtual cams are the other players. Basically I have it so that the cameras move around and then tell the server which controlls all of the actual player models "please send the player over here"
btw networking questions should go in #archived-networking
@main anchor adding to that, I know it's possible because my Character Controller also uses a function to apply a different gravity when grounded ** vs** when not grounded
private void ApplyGravity()
{
if (characterController.isGrounded && gravitySim < playerSettings.gravity)
gravitySim = playerSettings.gravity;
gravitySim += playerSettings.gravity * Time.deltaTime;
}
gravitySim is the Y velocity being added to the CC via the Move(); function, and
playerSettings.gravity is my desired gravity, I tend to use -10.5f
characterController.isGrounded 😬
I guess it works for basic use cases but that thing does suck
i have a new idea, i want to play an audio clip at this point, how do i do that?
use AudioSource
also whats good with that formatting
ya, works fine for me soo far.. wouldn't be soo good if it were a platformer tho
spheres all day errrday!
bout the only reason I have it is for my little head bob when you land from jumping 😄
this is cool.. i have a ceiling check.. that could probably be just flipped for a more accurate ground check..
but it uses raycasts instead of spheres
thats actually a good idea why didn't I think of this for more "omphh"
Umph indeed
I like raycast but they are too thin I ended up using something that fits a capsule better for edge cases, literally edges 
oh yea, keep in mind My prototype projects are all open-sourced free or custom assets..
i don't usually show my production stuff in here too often..
my production controller also uses raycasts but its a bit more advanced 😉
woa look at that fancy inspector
trying to figure out how I can use better detects of ledges before falling like grabbing
{
if (hammerValue >= 1f)
{
return 0;
}
if (hammerValue <= 0.745f)
{
return 1;
}
if (hammerValue > 0.745f && hammerValue <= 0.833f)
{
return 8;
}
if (hammerValue > 0.833f && hammerValue <= 0.915f)
{
return 14;
}
if (hammerValue > 0.915f && hammerValue < 1f)
{
return 8;
}
return 0;
}``` i seemed to have copied the slider values but in game play if i hit say just under 0.833f it returns 14 rather then 8. am i doing anything wrong here.
why are there such specific values esp with floats
Hey, I want so that a line renderer's position is exactly where my cursor is, on update.
This didnt work: https://paste.ofcode.org/UBAXn5qXuhMuTTNTAtfSyF
on the image the grey is 1 attack damage. yellow is 8, red is 14,
for all you know it could be 0.83399
which could be bigger than assuming it was 0.833000
maybe offset ur detection and have multiples.. in the direction ur moving.. that way u can get a heads-up before actually reaching it
well i was moving the slider to get it to line up with my eyes
I pasted your code in an online compiler and fed 0.833 to the method, it returned 8. So you're not feeding that exact number to the method
ahhh sshit thats actually clever that gives me an idea
So what does that mean, the slider is wrong or my values
Whatever you're passing as an argument to that method is not what you're expecting it to be
Im thinking it coud be a cast ? like spherecat
can you tell me what online compiler you used please
thank you
ohh gosh.. this reminds me of my 8-D sprite system..
don't judge. i had to search my garbage bin to find it 😅 MODULUS no where to be found
never used this before but im guessing this is wrong
fuck this reminds me of my compass
im slowly learning
It's the default placeholder class. What you can do is remove it entirely and put your code right at the root of the file
The compiler will then use top-level statements to execute your code
you should also debug.log in unity what the actual value you're getting
compass is easy..
needleDirection = Vector3.forward; 😉
.. blabla.. project to plane.. tada! lol
😮 sea of thieves ?
no! idk why people keep saying that..
its completely different.. and completely original
lol
this is the first time i have ever seen you helpers show of some game stuff its cool
lol.. realistic af
- friendly fire!
lol, if i could only ever finish anything
haha yea
i do from time to time.. when the channel is pretty quiet
some ragdolling is in order
also, i dont wanna reveal any 1,000,000 dollar game idea by accident ya, know 😄
need help how to fix this error https://hastebin.com/share/oguwevijuq.csharp
oh thats there too.. a few folders deeper.. but imma save that for another day
have you finished and published any games
!ide
If your IDE is not autocompleting code
or underlining errors, please configure it.
Select one:
• Visual Studio (Installed via Unity Hub)
• Visual Studio (Installed manually)
• VS Code
• JetBrains Rider
• Other/None
to be more precise, you IDE will help you fix this if you configure it
can you show where you defined gameOver()
only gamejam games atm.. Im working on a Sci-fi Low poly Shooter Game as a Serious project..
when its got enough game systems i'll post a Demo on my itch.io page
nice sounds good.
whats your itch.io page
i should do a gamejam, been too long..
i'll do one if u do one..
like the look for sir gatling
i just did the 3d models for that one
do you win any prizes for gamejams
it got featured by IGN
has an interesting aesthetic
im sure some of em have prizes.. but all the ones ive competed in doesn't
delorean ayooo
no, it just looks like one 🤫
yea that'll work.
this is what i been working on. tring to sort out the slider lol
looks really good soo far
oh yeah I remember this proj, lookin good!
cheers, were on like year 4 haha
it happens, i've pushed back my release date 2 times already
it says Spring or Summer of 2025 for now.. 🤞
i spent the first 3 years doing it in 2d and then changed lol
Im sure you will get there delayed games are always better
ouch
good thing about that tho, is u probably have a pretty nice 2d template u can work from now
how do i play an audio source at this point ?
audioSourceReference.Play();
audioSourceReference.PlayOneShot();