#💻┃code-beginner

1 messages · Page 743 of 1

loud remnant
#

did you try to change the camera controller and the movement controller scripts?

change the void update functions to void lateupdate

true pine
#

I did the lateupdate thing

#

changed nothing

loud remnant
#

hmph

#

screenshot me the code
but only the part where the camera controller is mentioned

true pine
#

don't mind the comments

#

here's the whole script cos it isn't that long

loud remnant
#

certified unity moment

true pine
#

so it's an engine issue?

loud remnant
#

I can understand what the script does yet you get an issue
show me the movement script

loud remnant
rich adder
rich adder
#

indeed

loud remnant
true pine
#

HOLY SHIT IT WORKS

loud remnant
true pine
#

ahole

#

I was sending the caseoh gif

#

"THIS IS A MOMENT IN HISTORY, TAKE A PICTURE"

loud remnant
rich adder
loud remnant
#

where did you learn how to code tho

#

js finished a small course and tryna get into more C#

rich adder
true pine
#

another thing I didn't like about the tutorial was the fact that it wants me to use projectiles for bullets

rich adder
#

Nothing wrong with that, depends on the style of the game / weapon

loud remnant
true pine
#

grenade launchers n shit

rich adder
#

Raycast are good for Hitscan weapons , for projectiles you need to "simulate" the velocity and possible a drop yourself

loud remnant
#

rigid body bullets can be used to give the bullet travel speed and bullet drop easier than raycasts
but can be problematic in performance iirc

true pine
#

this doesn't need to be hyper-realistic, I'm going for something like tf2

rocky canyon
#

rb are fine if u pool them

rich adder
rocky canyon
#

raycastgoodtoo

loud remnant
#

it's a toggle feature

true pine
loud remnant
rich adder
#

A big issue with rigidbody is if they are too fast they might not register even with continuous collisions

true pine
#

I'll deal with rbs later, I'm just tryna get hitscan right now

loud remnant
sage mirage
#

Hey, guys! Is it possible to create crouching system without having humanoid at all, by animating the camera itself?

#

Like if you want to animate the camera to go up and down without having the humanoid rig

#

like you have just the camera itself, I was just wondering

rich adder
cosmic dagger
edgy sinew
sage wyvern
#

my unity is glitching

#

i started adding animations and now the ui is glitched

#

on the right hand side

#

fixed it

#

but i can't seem to get my animation to work

loud remnant
sage wyvern
loud remnant
#

Ctrl + s first (save)

loud remnant
sage wyvern
true pine
rich adder
sage wyvern
rich adder
polar acorn
sage wyvern
river sandal
#

Does MonoBehavior and NetworkBehavior the same except MonoBehavior is for single player?

timber tide
#

Network is sync'd between clients

#

The transform data that is

sour fulcrum
timber tide
#

Oh yeah just in general NetworkBehaviors will include the transform data sync'd

#

as GOs can only exist with a transform anyway. Either case you're not usually RPCing the transform data

sour fulcrum
timber tide
#

Not sure what to elaborate on. If you're using NetworkBehaviour you're using tied to using a NetworkGame objects

sour fulcrum
#

NetworkGame?

You specifically said transform data but i’m not sure what you mean by that

river sandal
#

So how would anti cheat work on multiplayer

timber tide
#

NetworkBehaviours are usually instantiated upon these NetworkTransforms because otherwise you'll be adding a bunch of boilerplate to RPC every bit of your hierarchy's transform to the server and each client.

#

Which also have options on the network identity to not transmit that data, but in general if you're working with multiplayer you'll be using these specific gameobjects any time you want to provide positional/rotational data to the server

gentle moat
#

I’m making a top down 2d pixel art game and cinemachine’s dampening is causing minor jittering. Is there a way to fix this? I would like to have dampening still.

timber tide
cosmic vapor
#

Using System;
Class Program
{ static void Main(){ Console.WriteLine("hello world");}

#

Just learned thisss

gentle moat
river sandal
timber tide
#

Pretty much

#

The only time you'd really use general monobehavior if you only want client sided scripts to run

#

Such as UI for instance

rich adder
#

all the network stuff is relative once the Network is started

#

eg isClient doesnt return anything accurate until you are connected etc.

river sandal
rich adder
#

but yeah you don't use networkbehaviors for literally everything, just things that need to check those properties, or receive those network event

river sandal
#

if we have NetworkBehavior

river sandal
#

its like private and public

#

if everyting is public it can be a headache

rich adder
#

idk what you mean by that

river sandal
#

and private variables

rich adder
#

access modifiers have nothing to do with anything here

river sandal
#

right- it was just an example.

#

so what do multiplayer frameworks like photon do again

#

sync computers or something

rich adder
#

they are basically all the boilerplate code you would normally write yourself

river sandal
#

so like

#

they are shortcuts

rich adder
#

thats not how it works

timber tide
#

there's also lag compensation a lot of these libraries provide that is usually a pain to write

river sandal
rich adder
#

you send RPCs usually to tell other computers what to "sync" in a way

#

but they are all running their own simulations and their own timings

#

they don't know about each other at all

river sandal
#

so does it sync objects and physics?

rich adder
#

things like NetworkVariables ease this for you and sync variables automagically

river sandal
#

how does it link it together

rich adder
#

so its up to you to sync and communicate to clients what to sync

timber tide
#

server is what runs the actual game state which all clients abide by, by most mesh-network approaches

river sandal
rich adder
#

thats what makes networking very difficult especially when lag plays into it

rich adder
eager stratus
#

So I'm not sure what it is about my movement code that is causing the character to get stuck on a ledge like in the GIF

eager stratus
rich adder
#

if client wants to Shoot , it sends RPC to server to tell I am Shooting this other object, then server finds out which client that is and it sends RPC to it for damage etc.

timber tide
#

server could also say no, you weren't allowed to shoot to prevent speed hackers to manipulating it all

river sandal
rich adder
#

yea ideally server always keeps the "state"

timber tide
#

then your choice of sync it back to the server state or stay with your desync'd state

rich adder
#

often why third party tools are used

river sandal
rich adder
river sandal
#

dont those programs need like alot of access to your computer

rich adder
#

well now there is a new trend to get into "SecureBoot" which is part of your CPU/Mobo and that is basically kernel level anti-cheats

#

lots of these don't work for other platforms like Linux

junior saddle
#

hi chat

#

I want to do node pathfinding

rich adder
#

its pretty common issue especially with capsule controllers

#

there isn't an exact fix and you need to get a bit creative on how to fix it

eager stratus
timber tide
#

character controller has issues with it too

junior saddle
#

I want to do node pathfinding

eager stratus
rich adder
#

i've seen some people somewhat "nudge" the controller off the ledge

#

or shrink the collider momentarily as you mentioned

eager stratus
timber tide
#

Just do box collider ;)

rich adder
#

real old school

#

goodluck on slopes though lol

eager stratus
rich adder
#

and some maths

eager stratus
rich adder
#

then you can see if its 1 ray only hitting and "under" the middle and sides is a gap to fall you push that way

eager stratus
rich adder
#

start where the capsule bottom "quarter" starts pointing downn

#

like here

eager stratus
rich adder
#

they all point down?

eager stratus
rich adder
#

so if only 1 ray is hiting but not the others, then you kinda know you're on a ledge

#

ofc you gotta handle other situations (edge cases)

potent hound
#

Hi there! I was advised to come here in hopes of resolving an upcoming Unity patch which will very likely break the english translation mod for the game Duel Masters Plays

#

This will very likely happen to DMP, once the unity update patch goes live tomorrow

#

I know absolutely nothing of coding. Translating the game simply (tediously) requires renaming text in a massive text cache file. I'd like to know what I have to learn in order to adequetely solve this potential issue by myself, since the mod is more or less abandoned

keen dew
#

Discussing modding isn't really allowed here but if you have no coding experience it's not going to be easy. Most likely you'd have to learn how the mod works and dig deeply into Unity internals so it's a big hill to climb

potent hound
#

Ah, sorry.

#

I see. Guess the community's cooked then

gusty jay
#

atwhatcost is there any tutorial that make head baller game in unity 2D

#

Using script grabh

sage mirage
#

Hello, guys! I have made animations for my camera in order to create crouching everything works fine when I am pressing C button its crouching and when from crouching pressing C it stands up, but the problem is I cannot move at all because I am using character controller to move and my animations I think doesn't letting me move at all. What could be the problem?

#

I am not using humanoid at all

#

only animating the camera

forest cosmos
#

Hey guys, new here. Learning Network for gameobjects and have a small issue. if someone can help me out with it?

keen dew
forest cosmos
#

oh okay. Thank you.

silk night
teal viper
silk night
#

!code

radiant voidBOT
sage mirage
#

I know its of course easier to animate and move with humanoid rig but without one things are getting more complicated

teal viper
spice ivy
#

Don't you dare go hollow

vast folio
#

is there a template file with a standard first person control script ready to go? cus im either really bad at following tutorials or the ones ive been trying are outdated

#

this is the code im running and i always get this error whenever i try and move the player

wintry quarry
slender nymph
wintry quarry
vast folio
slender nymph
vast folio
#

i read it i just literally do not know anything about unity bro

slender nymph
#

then you're getting ahead of yourself.

#

!learn

radiant voidBOT
vast folio
#

is this not the beginner channel

#

for coding

slender nymph
#

it is, but you're still expected to at least put in some effort

vast folio
#

i spent like an hour looking at tutorials i only came here as a last resort

slender nymph
#

could've also spent 30 seconds copy/pasting the error message into google and the top dozen or so results would tell you how to fix it. hell, google's bullshit AI overview even tells you

vast folio
#

aint gotta act like im an idiot just because i dont know programming as well as you do or im not very observant in your eyes

slender nymph
#

nobody said anything about you being an idiot or not having knowledge. it's just being pointed out that the answer to your issue was literally in the error message and that putting in literally any amount of actual effort would have resolved it quickly

vast folio
#

brother

loud remnant
#

what if I put a minus behind the vector3.forward in transform.Translate(Vector3.forward * Time.Deltatime * 20)

#

what would happen

slender nymph
#

reaction images are not allowed here

loud remnant
#

damn what a strict server

rich adder
#

can you not shitpost. ty

loud remnant
#

can't do anything

slender nymph
#

also if you think using a negative value is going to crash anything then you might want to revisit grade school math

shell sorrel
#

it takes literally 5 seconds to try and and find out what it would do

loud remnant
slender nymph
#

shitposting is also not appreciated here

loud remnant
#

maybe when I feel like I'm gonna chat again

naive pawn
#

this isn't really a server for chit-chat, this is a help server

polar acorn
silent isle
#

Hi

rich adder
silent isle
#

Is C# difficult to learn?

naive pawn
#

depends

edgy sinew
#

It's different for everyone. Technically speaking, no, it's a really pleasant modern language

naive pawn
#

how much experience, if any, do you have with programming beforehand?
how apt are you with the process of breaking down problems into smaller tasks?

etc etc

edgy sinew
#

If you are good at analyzing things, actually video games across history do the same kinda stuff over and over. Exceptions being novel breakthroughs like Motion Matching, GPU instancing, whatever.

silent isle
#

experience = none.

naive pawn
#

compared to other languages, it's about middle of the road in terms of learning curve, imo

but programming as a whole kinda has a learning curve on its own

silent isle
#

How many years it takes to master C#?

naive pawn
edgy sinew
naive pawn
#

there's always more to learn

#

but you don't need to know everything to be experienced enough to make things

#

you don't need to know much to start - as you get better, as you learn more things, you can make more complex things

polar acorn
edgy sinew
#

My advice is to make a decision on what exactly you wanna build. Cuphead clone, PUBG clone, Civilization clone, Clash of Clans, whatever.
Then you start analyzing how that works, research how it works. And you come up with the 5-10 strategies / concepts needed

naive pawn
#

think about other skills, mastering art, math, carpentry, etc
you can never "complete" those subjects, there's always more you can do
but you don't need everything

same thing for programming

silent isle
#

Yeah.

edgy sinew
#

We can't give you specific answers if you don't have a specific goal

grand snow
#

I thought I knew things then I started learning about value categories in c++ 🙁

naive pawn
#

ive been going through those for like a month lmao. though tbf it hasn't been continuous

#

++container.begin() is an lvalue and that is deeply unsettling

silent isle
#

What is Unity?

naive pawn
#

depends on what you're asking exactly

#

it's a company, it's a software, it's an ecosystem, it's a community

edgy sinew
#

You can do cool stuff in 3D or 2D. Basically whatever you want. That's it

polar acorn
silent isle
#

i can only imagine creating an 3D game. huh

naive pawn
#

mario, metroid, smash

#

pokemon

#

stardew valley

#

terraria

#

the list goes on

silent isle
#

Is it free?

naive pawn
#

did you put any research into unity beforehand?

#

these are pretty simple questions, and i have a feeling you have more that would all be easily answered by some quick google searches

edgy sinew
#

what the heck do we look like to you, Google? 🙂

polar acorn
silent isle
#

I just wan't to learn new things from people, not from google.

naive pawn
#

people wrote stuff for google to give you

edgy sinew
#

News flash, everything on Google is "from people"

#

😭

naive pawn
#

so we don't have to say the same things over and over again

polar acorn
silent isle
#

fine

naive pawn
#

googling will save us all, and especially you, a lot of time

#

and it'll also give extra info that you can research further and learn more

#

using available resources effectively is a very crucial skill

jovial elm
silent isle
#

is it?

naive pawn
#

no, it depends

jovial elm
cosmic quail
naive pawn
#

the first language you try is always the hardest

jovial elm
naive pawn
#

yeah, same here?

jovial elm
#

it doesn't have drag and drop system

naive pawn
#

huh? c# doesn't either

#

that would be a unity thing, not a c# thing

jovial elm
naive pawn
#

yeah, that would be a comparison of unity vs [whatever engine you were using before], not c# vs python

polar acorn
#

Python is specifically annoying because it isn't strongly typed which makes managing large projects a nightmare.

fast helm
#

How can I remove this? It always asks me everytime I open up my project

It just appeared up recently

polar acorn
fast helm
#

only an unlock button is available

polar acorn
#

"Features", that's what they're called. Had to go check

winged ridge
verbal dome
haughty lion
#

Hi guys

#

The script somewhy isn't working

rain solar
#

Will anything go wrong if I store huge amounts of chunk data in a sqlite db so I can have both random read write access and chunk compression?

haughty lion
#

Could you please help me to solve this?

polar acorn
haughty lion
haughty lion
#

But when I remove "AttackRay.collider.gameObject == Player", it works tho

polar acorn
haughty lion
polar acorn
#

What is Player?

haughty lion
haughty lion
polar acorn
#

Tags aren't involved in this code at all

haughty lion
#

Ohhhhhh

#

Dayum

polar acorn
#

You set one on an object if the ray hits something, but what tags an object has currently are irrelevant

haughty lion
#

But what is Player here AttackRay.collider.gameObject == Player

#

Is it the name of the object?

polar acorn
haughty lion
#

Beforehand I thought this was used for tags' names, now I'm being aware of the contradiction

polar acorn
haughty lion
polar acorn
#

You're comparing AttackRay.collider.gameObject and Player.

#

Are they equal

#

So, I ask again, what is Player?

haughty lion
#

So it means it tries to equal collider's name with "Player"?

polar acorn
#

Where are you getting names from that line

haughty lion
#

Idk bro I'm new

polar acorn
#

It's checking AttackRay.collider.gameObject, and Player

haughty lion
#

I had to use the name because a circle sees its own collider

polar acorn
#

If those are the same thing, it's true

haughty lion
#

Which was the reason for me to condition it

polar acorn
#

So, what is Player?

edgy sinew
#

Include Layers and Exclude Layers can help. If your enemy would only need to detect the Player nearby.

#

I think using actual Collider components with OnTriggerEnter / OnTriggerExit is quicker than doing your own Raycasts or OverlapSphere etc

#

Checking gameObject == Player is probably not a great way to check if the collided object is a Player

#

Surely tags and layers work faster than, checking game object equality ... anyone know for sure ?

polar acorn
polar acorn
#

Granted, tags and layers are also trivially fast, but both involve dereferencing the pointer first, then comparing two pointers

#

(as long as you're using CompareTag so it doesn't need to do a string lookup)

polar acorn
# rough granite It's also slower...

It doesn't need to be, but doing all the stuff to make it fast basically blows away any of the good reasons to use the language in the first place

#

The conveniences provided by the language come at a cost

rough granite
#

Oddly enough the conveniences are what make me hate the language, i need my semicolons and wiggly brackets

edgy sinew
#

Yeah of course, C or C++ if speed is important

polar acorn
#

By "Conveniences" I mean more like pip and virtual environments

rough granite
edgy sinew
#

C# is faster than C? It cannot be

rough granite
polar acorn
edgy sinew
#

C is the most raw language yeah exactly

#

Before assembly language / machine code

#

Python runs on C... interpreted

rough granite
#

Ahh it's still faster c++ at least right?

edgy sinew
#

C#, faster than C++? Why

polar acorn
rough granite
#

Is it not? I was told it was quite a few times :/

polar acorn
#

You don't pick C# for speed

#

If speed is even on your list of requirements, you use C++. If it's at the top of the list, you use C.

rough granite
edgy sinew
#

"Speed" means it is programmed to be fast. Hence the access the language gives you to things, limits the speed

runic basalt
#

Anyone know if shaders used in URP Decal Projectors can be dynamic? I'm trying to have decal projector that grows a water stain on the ceiling. I have a script that is adjusting the shader property to have the visual fade in over time, and I have debugged the value coming from the shader and can see that it is changing as I'd expect, but as soon as the instance of the projector is created, it is completely visible immediately instead of fading in over time. Even if I comment out the code that fade it in and just have the code in the start function that sets that value to 0, it's still there as though it's not being set. I've also selected the projector in the scene at run time to verify that I have set the instance of the material and not using the original.

haughty lion
#

guys sorry for very basic question

#

But how could I solve this?

polar acorn
# haughty lion

Drag in the object you want to call the function on, not the text file containing the code.

haughty lion
#

👍

vale karma
#

bro unity 6 screwed me. Check this out. I had this problem earlier creating a char variable to type in a letter in the editor. Try with any other version it works. This script is pulled from a previous version. Even adding a variable on an already created script with similar variables no longer allows me to do this

polar acorn
#

<@&502884371011731486> scam

frosty hound
#

!ban 1424374630206144575 scam

radiant voidBOT
snow olive
#

Hello,
my progress bar is this weird oval shape, whenever I set the image type to filled.
How do I make it a rectangle?

polar acorn
#

Use a uniform scale, then change the size of the rect to resize the sprite

snow olive
#

I am new. How do I use a uniform scale?

hexed jungle
#

hi

#

how can I fix it ? I have older version ?

polar acorn
# hexed jungle

Rigidbody2D.velocity has been deprecated. Please use linearVelocity.

hexed jungle
#

I want velocity not linearVelocity

#

I don't want to change it, how can I remove it so that it doesn't correct me.

polar acorn
#

it's linearVelocity

hexed jungle
#

why?

polar acorn
#

Because linearVelocity is more descriptive to what it actually means

hexed jungle
#

but this is the same and is faster to write

polar acorn
#

It is the same, that's why you should use linearVelocity

#

It's shorter, but less correct.

#

.v would be shorter still

#

but less useful

hexed jungle
#

ok thanks

eternal needle
vale karma
#

i sent in a report, nothin back yet

#

a big chunk of my code relies on getting those characters lol. tf unity

eternal needle
vale karma
#

Lol that works. weird how that works tho

manic gorge
#

How do I stop VSCode from showing the rosyln generated code when I search by references? it's a lot of noise to wade through when looking for a reference to something.

haughty lion
#

Hey guys

#

Could you tell me please why isn't my player jumping?

slender nymph
#

if i had to guess, i'd say that your isGrounded method is returning false. but you need to actually add some logs or something to verify

haughty lion
#

Ohh

#

Okay, thanks 👍

slender nymph
#

also, if you want a cast with 0 distance, why not just use an OverlapBox instead? your cast doesn't move so it isn't going to move into another collider

haughty lion
#

Isn't working 🙁

slender nymph
#

and have you bothered actually checking if that is even the problem?

polar acorn
#

Try logging the result if isGrounded

#

see if it ever actually is true

haughty lion
haughty lion
slender nymph
#

if you're logging then where are the logs

haughty lion
#

IsGrounded is false somewhy

polar acorn
haughty lion
#

How can I make sure that box collider is right exactly in the intersection with the mask? Ray can be seen, so can be the box?

slender nymph
#

well that "True" log is certainly misleading. but does it actually print?

haughty lion
#

Sorry, I don't know, I only started learning Unity recently

#

I trust Debug.Log for booleans and etc.

polar acorn
slender nymph
haughty lion
#

it is notable

slender nymph
#

huh wtf does that mean

wintry quarry
#

Sounds like a translator is being used

haughty lion
#

dude I tried to put it in an update

#

it hadn't been affected at all tho

#

the same result

slender nymph
#

okay, that's irrelevant. i will ask again, is the log that only says "True" printing to the console. yes or no.

polar acorn
#

So, did the log print

haughty lion
#

No

polar acorn
#

Then you aren't calling this function anywhere

slender nymph
#

congrats, isGrounded isn't even being called then!

haughty lion
#

I tried to call it with isGrounded = true implemented in the fields of the class

slender nymph
#

which indicates either the Jump method isn't being called or the context.performed is false

slender nymph
haughty lion
polar acorn
haughty lion
#

cuz I changed its method, changing it from the method to the actual boolean

slender nymph
#

instead of making random changes that make no sense, why not actually attempt to debug the way we've suggested so that you can actually figure out what the fuck is wrong here instead of throwing a bunch of shit at the wall and hoping something sticks

haughty lion
#

Send me the solution then instead of being toxic

polar acorn
#

So the goal posts keep moving further and further away

slender nymph
haughty lion
haughty lion
slender nymph
#

then cooperate

polar acorn
#

We said "log the value of this function to see if it's being called" and instead of answering it you changed the function to a bool for some reason?

haughty lion
#

these changes I mentioned were made earlier

polar acorn
jagged shoal
#

I'm trying to get input key, but it fails

haughty lion
#

I didn't change anything there lad

polar acorn
#

So now the answer we had is irrelevant because the code is different now

slender nymph
haughty lion
polar acorn
haughty lion
slender nymph
polar acorn
haughty lion
polar acorn
jagged shoal
#

I'm using javascript on unity cloud

polar acorn
haughty lion
#

Shall I try to change context.performed?

slender nymph
haughty lion
#

Okay

jagged shoal
solid marlin
#

hiya, I want to start learning unity, Im probably going to start with the official unity tutorials but Ive heard that those are a bit too "guided" as in they just straight up tell me what to do instead of why to do something, should I just start with that and then simply try making small projects or should I look towards other tutorials instead?

slender nymph
#

!learn do the pathways on the learn site 👇

radiant voidBOT
haughty lion
#

I've tried to call it in function without "context.performed" and it didn't work either

slender nymph
#

alright, if you're just going to ignore what is being told to you then i'm done attempting to help

haughty lion
#

You're telling me to log

polar acorn
haughty lion
#

I logged it with "debug.log"

slender nymph
#

show the new logs then

haughty lion
#

And I'm attempting to see if "context.performed" is the problem or it is situated elsewhere but in the actual boolean

#

Lemme

polar acorn
# jagged shoal

I don't think cloud code is used for this sort of thing. It seems to be something that runs entirely s ever side so I don't think there's any input it can read from

haughty lion
#

Here's what I did

slender nymph
# haughty lion

there are no new logs here. so you didn't bother trying to log like i suggested

haughty lion
#

LOGGG

#

LOGGING IS THAT LIKE DEBUG.LOG?

polar acorn
slender nymph
polar acorn
#

So it's just calling Is grounded directly

haughty lion
#

There are 2 debug logs 😭

polar acorn
#

Does that log run

#

The one in is grounded

haughty lion
slender nymph
#

put one outside of the if statement so you can see if the method is even running at all

haughty lion
slender nymph
#

huh?

haughty lion
#

Which one of log shall I delete?

slender nymph
#

i didn't say anything at all about removing a log. i said add one

haughty lion
#

Ohh

#

Okay

polar acorn
#

They told you to add a log

haughty lion
#

Sorry bro

#

I'm sleepy

#

01:18 here been doing mathematics before

slender nymph
#

then go sleep and come back when you aren't making your lack of thought everyone else's problem

haughty lion
#

I haven't done well I have to solve this

polar acorn
haughty lion
#

Like this?

polar acorn
haughty lion
#

Lemme check

#

It doesn't

slim mortar
#

does anyone know how i could show something like this in the inspector?

public class AStarPoint
{
    public Vector3 position;
    public List<AStarPoint> connections = new();
slender nymph
# haughty lion It doesn't

well there you go, that method isn't being called. see what you did different for that compared to your horizontal movement

crimson pike
#

not sure where this question should go. anyone using localization package, would preloading my dialogue string table for just the active locale bite me later down the road? how do you manage your localization tables for scalability?

polar acorn
haughty lion
#

NAHHHHHHHHHH

slender nymph
haughty lion
rough granite
# haughty lion

well this is a problem, you are printing it true before it even checks... meaning everytime it's called it'll say true even though it might not be

slim mortar
polar acorn
slim mortar
polar acorn
haughty lion
#

The one I'm using for Move

slim mortar
polar acorn
haughty lion
polar acorn
#

So, what is the difference between Move and Jump

haughty lion
#

I mean in Move I just read the value of buttons for Vector2 and in Jump I type something

#

Bro I don't know

#

Tried to adhere to a tutorial

wintry quarry
#

You'd need SerializeReference and a custom inspector

#

Typically serialized fields are fully duplicated out

polar acorn
polar acorn
# haughty lion

That doesn't really answer my question. I'm asking how you're calling these functions.

#

Move is getting called. Jump is not.

#

So, what's the difference between how you're calling them

haughty lion
#

In Move I just read the value of the button, the bind which is related to the keyboard.

Jump is asking if button is read or not, so it has to be performed when I tap a button of bind

slender nymph
#

that information is not relevant to the question that was asked. you were asked how these methods are being called. presumably another component is doing it if there's nothing explicitly using them in this one

haughty lion
#

They have the same modifier, the same parameter

#

I don't know

slender nymph
#

surely the tutorial showed how to set it up so that the methods are called when you perform your input, no?

haughty lion
#

I didn't particularly follow tutorial fully but at the beginning was writing by my own

#

And only later I started adhereing to that

#

The only thing I had noticed which I missed is that he created Jump bind, which I didn't

slender nymph
#

and you don't think that has anything to do with why the Jump method isn't being called?

polar acorn
haughty lion
slender nymph
#

and what exactly is connecting those buttons to the Jump method?

haughty lion
polar acorn
slender nymph
#

what, did you finally go and look at your input action map and see that you had a completely different button mapped to your Jump action?

polar acorn
#

Yeah, if you want to change the binding to something else, you have to actually change the binding

haughty lion
#

it worked after I tapped SPACE

polar acorn
#

It doesn't just read your mind to know what button you want

haughty lion
#

I WAS TAPPING W AND S BEFORE

slender nymph
#

now if only you had any idea what you were doing we could have guided you to that earlier

rough granite
#

what else would jump be, unless it was a 2d game which i doubt was mentioned, and you'd need to change that yourself

haughty lion
#

It works....

slender nymph
#

now instead of trying to follow shitty "Do X in Y minutes" tutorials that aren't really teaching you anything and are just expecting you to blindly parrot what they are doing, consider going through some actual courses that teach you, like the pathways on the unity learn site

haughty lion
slender nymph
#

!learn

radiant voidBOT
haughty lion
#

and things related to Inspector I learn through videos

polar acorn
haughty lion
#

Okayy

#

I will try to

slender nymph
haughty lion
#

GPT is very helpful I think

slender nymph
#

you think wrong

polar acorn
#

It really, truly isn't

rough granite
haughty lion
#

not C# of course 😄 It cannot build up a plan in learning a programming language presumably

#

I learned C# from metanit

slender nymph
#

but you think it can build a learning plan for a game engine, which is arguably harder to learn than a programming language?

haughty lion
haughty lion
#

I mix it with Documentary

#

Documentary is at the top

rough granite
slender nymph
# haughty lion Documentary is at the top

if documentation is your number one resource, then why didn't you just learn how to use the input system from the course in its documentation and instead relied on a terrible tutorial that isn't really teaching you anything?

haughty lion
#

Bro I'm telling ya I accidentally have been pressing W and S instead of SPACE

#

That's why method hadn't been calling

rough granite
slender nymph
haughty lion
#

It already was implemented there

#

Why would I create my own 😄

slender nymph
#

the action was, yes. but not your desired bindings for that action

haughty lion
#

Good night guys

polar acorn
#

You apparently wanted it to be W instead of Space

haughty lion
#

Bro ya not telephatic wdym by I wanted it

slender nymph
#

so you knew it was set to space but you were pressing a completely different button on purpose?

haughty lion
grand snow
#

troll?

errant bear
#

guys why inst my script working
HelloWorld("print")

rich adder
errant bear
#

alr bruh

#

holy moly

rich adder
#

@errant bear if you have a proper coding question then ask it properly otherwise no need to add extra noise

#

👇

radiant voidBOT
# rich adder 👇

:thinking: Asking Questions

:mag: Search the internet for your question!
:book: Use the API Scripting Reference and User Manual and this troubleshooting site for commonly posted issues.
:wrench: Attempt to debug your issue.
:thought_balloon: Find an appropriate channel by reading the name and description in #🔎┃find-a-channel
:grey_question: And don't ask to ask, ask a full question illustrating with screenshots if needed.

-# For more posting guidelines, go to #🌱┃start-here

errant bear
#

alr now can you tell me whats wrong with this

polar acorn
rich adder
errant bear
#

and it uses ai to translate it into the cloest thing in c#

#

so why isnt this working

rich adder
#

lol what

rich adder
errant bear
rich adder
#

it tells you whats wrong, its not defined

errant bear
#

but i listened to the brackeis tutorial

#

yeah

#

he was like

polar acorn
rich adder
#

HelloWorld isn't defined, you cannot call a function that isn't defined. Again this is a unity coding question so unless you have a unity c# coding question, we cannot help you

errant bear
#

"and then you guys just do Helloworld("print")"

polar acorn
errant bear
#

yo what

#

not even gifs are allowed

frosty hound
#

Can you stop spamming, thanks.

errant bear
#

of

#

ok

#

ban me bruh idc i was here to ragebait but apparently nobody here knows python ball knowledge

frosty hound
#

!ban 858129864933244940 soamt

radiant voidBOT
frosty hound
#

Huh weird auto correct lol

still ingot
#

Does anyone know the reason for why I am getting these errors?

#

here is my code for the project I am working on. Its a simple dialogue system I was making

rich adder
polar acorn
#

I think they might have rushed these patched versions out the door and didn't fully decouple the broken 6.2 code from them

still ingot
#

Dang and I just told my team to switch to this version two days ago 🙄

rich adder
#

stick to LTS usually

#

especially if its a production project

#

Hopefull you made a git commit you can revert to before the upgrade ?

still ingot
#

Yeah everything is on git and I haven't made the commit yet because of the issue of the dialogue system

rich adder
still ingot
#

Also is there a better way to go about playing sfx? I've read on forums that using animation events are better than programming it in when clicked and vise versa.

#

I did the character sfx through programming after you click the button instead of an animation event.

rich adder
#

depends what you're doing, if you need it to play at an exact time in the animation then yes animation event is usually the most accurate imo

#

if you need to play on click, then probably no point of animation event

still ingot
#

Okay thanks, this isn't animation the characters flip ( gameobject's set to false ) at specific dialogue points(index). I'm not that experienced in creating a dialogue system between characters. Only just pop ups over items.

rich adder
#

my only experience with dialogue was using something like ink

still ingot
rich adder
#

its open source

grand snow
#

Inkle and yarn are good

rich adder
#

ya heard good things on yarn too, I'm just cheap xD

grand snow
#

i think its free or cheap. I used it in a project and had good results

rich adder
#

danng 50$ on itch but 75$ on unity asset store

still ingot
#

Also i have been working on small mechanics outside of my project that I can save on my github and pull for other projects. I don't know why I haven't been doing that haha.

rich adder
slender nymph
#

Check out OpenUPM too, then you can create stuff to install through the package manager so it's easier to manage the versions in your projects you use it in

marsh canyon
#

what am I missing? shouldn't the bool isPaused be exposed here?

using UnityEngine;
using Rewired;

public class PauseLogic : MonoBehaviour
{
    public int playerId = 0;
    private Player player; // The Rewired Player

    public bool isPaused = false;
}
slender nymph
#

Write a method for it

polar acorn
languid pagoda
#

is it possible to execute commands into command prompt and get a return value back?

rich adder
#

yes

languid pagoda
#

what is the method name? I did some googling and cant find it.

#

well actually I kind of explained that poorly let me rephrase

rich adder
#

Process class for starters, then you can Read output and shit like that. I gotta recall the exact steps in a different project cause its been a while, I've done it to run api servers and read the output

grand snow
languid pagoda
# grand snow id love to hear why you want to do this

I am creating a multiplayer game where community servers can add mods including custom scripts. I cannot use c# for this as you wouldn't want server owners able to access your personal files while connected to your server(or do a lot of other things for that matter). So i have embeded the web assembly runtime into unity using wasmtime. This will allow users to write scripts for the game in like 10+ languages(anything that can compile to a wasm file) one of which is assembly script. But in order to compile it to wasm you have to create a project in node js and execute several commands to the cmd prompt to do so. I am trying to make an editor script so I can just create it with a button in the createassetmenu

#

the web assembly runtime sandboxes the scripts for you so they can only do what you implement

grand snow
rich adder
#

found it

grand snow
#

I asked because I was unsure why you wanted this but editor only is safe

rich adder
#

dont mind my uhh arguments but yeah you can also add arguments or whatever

languid pagoda
#

Thanks for the example!

dapper flare
#

hi guys

#

how are you today and i would apperciate some help

radiant voidBOT
# rich adder 👇

:thinking: Asking Questions

:mag: Search the internet for your question!
:book: Use the API Scripting Reference and User Manual and this troubleshooting site for commonly posted issues.
:wrench: Attempt to debug your issue.
:thought_balloon: Find an appropriate channel by reading the name and description in #🔎┃find-a-channel
:grey_question: And don't ask to ask, ask a full question illustrating with screenshots if needed.

-# For more posting guidelines, go to #🌱┃start-here

dapper flare
#

im still confused on how to get help?

rich adder
still ingot
#

Does anyone know how to fix this issue with my sfx. I used an animation event to play the character's sounds but when it gets to the second one it just keeps on playing?

rich adder
# still ingot

what is this code inside of , you need to provide more context

dapper flare
radiant voidBOT
#

:teacher: Unity Learn ↗

Over 750 hours of free live and on-demand learning content for all levels of experience!

still ingot
#
    public void PlaySFX() //Animation Events
    {
        if (animator.GetInteger("Dialogue Point") == 0)
        {
            source.PlayOneShot(clips[0]);
        }
        if (animator.GetInteger("Dialogue Point") == 5)/*ERROR, Constantly spawning the voice line on top of each other forever*/
        {
            source.PlayOneShot(clips[1]);
        }
    }

    public void zeroText()
    {
        dialogueArrayIndex = 0;
        dialogueText.text = "";
        gameObject.SetActive(false);
    }

    public void NextLine()
    {
        if (dialogueArrayIndex < dialogueArray.Length - 1)
        {
            dialogueArrayIndex++;
            clickCount++;
            dialogueText.text = "";
            StartCoroutine(Typing());

            animator.SetInteger("Dialogue Point", clickCount);
        }
        else
        {
            zeroText();
        }

        for (int i = 0; i != changePoints.Length - 1; i++)
        {
            if (dialogueArrayIndex == changePoints[i])
            {
                change = !change;
            }

            if (change == true)
            {
                profileImages[0].SetActive(false);
                profileImages[1].SetActive(true);

                nameText.text = name2;
            }
            else
            {
                profileImages[0].SetActive(true);
                profileImages[1].SetActive(false);
                nameText.text = name1;

            }
        }
    }
dapper flare
rich adder
safe root
#

I have this code on line 20 that has it, where it should be grabbing a gameObject from the other script (Towards the bottom for the other script) And I have ran mutilpe different test to see that the gameObject is not null as it does equal something. But I still run into this problem and I can't see where the problem lies. Can someone help me see if i'm stupid or not?

https://paste.ofcode.org/bVbYQPJWjhKL3A4z3VvLdt

#

For got to send the error

rich adder
still ingot
safe root
rich adder
safe root
rich adder
safe root
#

Lane 28 on studio due to some spacing I have

rich adder
safe root
rich adder
#

you have to send the code with the namespaces

safe root
#

That's where the error is

rich adder
#

that way the line matches the screenshot

safe root
#

Yeah

rich adder
#

so moneyHandler is null

#

what is lockin?

safe root
#

That is in the other script below it

#

But that is what's getting the object, from a collider

still ingot
#

Are there any potential solutions for my error?

rich adder
rich adder
#

right now it makes more sense

#

if (moneyHandler.Lockin == null)

#

again moneyHandler is null

#

is it assigned in the inspector?

safe root
safe root
rich adder
#

thats not PlayerCash

#

PlayerCash is saying moneyHandler is null

safe root
#

Is it assigned

rich adder
#

where is MoneyHandler field

#

its cutoff..

#

there is no need to crop them this much

safe root
#

Sorry, I keep looking at the wrong thing, It is not assigned....

#

Thank you for the help

still ingot
# rich adder if you narrow it down to the cause?

I don't know why but it was the animation event inside of the animaton track. I just deleted it and programmed it to play the sfx at a specific clickCount. I would prefer to use the animation event because it worked for the first one i don't understand why it glitched out on the second one???

#

I put the PlaySFX() in my nextline function

#
{
    if (dialogueArrayIndex < dialogueArray.Length - 1)
    {
        dialogueArrayIndex++;
        clickCount++;
        dialogueText.text = "";
        StartCoroutine(Typing());

        animator.SetInteger("Dialogue Point", clickCount);

        PlaySFX();
    }```
rich adder
#

could be really anything , maybe you're stopping it on the animation event or the animation is looping ?

languid pagoda
#

How can I store objects of different types in the same list, particularly instances of System.Action, System.Action<T> and Func<T>?

polar dust
#

List<(float a, int b, bool c)>

rich adder
#

both can store as Delegate type

languid pagoda
# polar dust `List<(float a, int b, bool c)>`

Hm this could work potentially but would require a lot of manual coding later. Essentially Im using a library that provides me with 3 overloads to find a function in a script. I would like to store the results of all of them into the same list.

 Action? action = instance.GetAction(functionName);
 Action<T>? other = instance.GetAction<T>(functionName);
 Func<TB,TResult> func = instance.GetFunction<TB, TResult>(functionName);
languid pagoda
# rich adder both can store as Delegate type

oh wow this works ```csharp
Action? action = instance.GetAction(functionName);
Action<T>? other = instance.GetAction<T>(functionName);
Func<TB,TResult> func = instance.GetFunction<TB, TResult>(functionName);
functions[functionName].Add(other);
functions[functionName].Add(action);
functions[functionName].Add(func);

#

thanks again @rich adder

rich adder
jaunty junco
#

Ok can someone help me????
For some reason is the player reset / respawning now broken in my game. It was working before.

I was able to trace back the error to the player initialize method.

private void Initialize()
{
    if (this._isSetup) return;

    this._isSetup = true;
    LoadPlayerModel();
    LoadingscreenManager.Instance.Stop();
    this._playerCameraHolder = Instantiate(this._playerCamera, this.transform.parent).GetComponent<PlayerCameraHolder>();
    this._playerCameraHolder.SetCameraTarget(this.transform);
    Debug.Log(this._playerCameraHolder.name);
}

When using the debugger I can see that the playerCameraHolder object gets successfully initialized and the method SetCameraTarget() is working too.
But once the last line of the Initialize method is run it just gets stuck and the camera doesent exist anymore and the loading screen is still running.

It looks like unity forgets that it had run the initialize code????

slender nymph
#

But once the last line of the Initialize method is run it just gets stuck and the camera doesent exist anymore and the loading screen is still running.
what do you mean by this?

#

are you getting some sort of error on the last line?

jaunty junco
languid pagoda
# rich adder it could be a potential code smell ngl you lose a bit of type safety, might nee...

I am going to be honest. I do not like this wasmtime api and may try to find alternative runtime bindings or make my own. On the flip side when you are trying to point a c# function to the wasm function you call Function.fromCallback, it has 130 overloads of <T T1 T2 TResult> so that means if I want to write wrapper function I also have to make 130 overloads because not one of them accept Delegate smh

jaunty junco
slender nymph
#

then answer the question in the message you just replied to

jaunty junco
#

And I dont understand why I get the warning. The loadingscreen eventSystem should be disabled before the player camera gets instantiated

teal viper
jaunty junco
teal viper
jaunty junco
teal viper
jaunty junco
#

And I just checked. There is only one event system in the scene.

#

but it gives me the error that there are more than one event system in the scene o_O

teal viper
#

Then you must be creating new ones.

tacit prism
#

trying to learn about state machines right now

for some reason im getting error CS0122 saying that my statemachine is inaccessible due to protection level. However im directly calling the statemachine, afaik

if you want me to put the code in blazebin i can, but everything is fairly small and straightforward, very confused on why im having this issue.

wintry quarry
#

It's not your "statemachine"

jaunty junco
naive pawn
#

@jaunty junco are you using additive scene loading?

teal viper
jaunty junco
naive pawn
#

does each scene have its own event system

jaunty junco
teal viper
#

And more importantly confuse us

jaunty junco
teal viper
jaunty junco
teal viper
#

Do you mean that you modified the package source code?

jaunty junco
#

Im gonna delete it once I fix this

teal viper
#

And it prints?

jaunty junco
#

Yeah

teal viper
#

Can you show that log in the console(with a callstack) as well as the source code?

jaunty junco
#

yeah one sec. This is my scene structure when running the game. I marked the only eventSystem

jaunty junco
naive pawn
#

try searching t:EventSystem in the hierarchy tab to see if you maybe added an EventSystem on something else by mistake

teal viper
#

I wonder if there is a default one on the canvas...

teal viper
winged ridge
#

One is likely being made and put into don't destroy on load, and the other in the standard hierarchy

jaunty junco
#

Ok I think I know where the error comes from now.

#

I call the initialize method in the Start and the OnNetworkSpawn()

teal viper
jaunty junco
tacit prism
teal viper
jaunty junco
teal viper
jaunty junco
#

But it doesent really have anything to do with networking. Its only on the client side...

teal viper
#

If so, then you should be able to debug it with logs and breakpoints.
Identify the calls that should not be happening. Place a breakpoint/add logs. Check the callstacks, object/reference IDs.

jaunty junco
teal viper
#

Debugging flow is very simple:

  • does something happening even though it shouldn't?
  • if yes, add logs, breakpoints and see where it is called from and why.
  • Does something not happen, even though it should?
  • if yes, find the place where it should be called from and investigate why it doesn't.
#

And we can't help you, since we don't even understand these should happen/shouldnt happen things in you project.

#

You need to provide exact lines of code that do/don't get called and are related to the issue.

jaunty junco
#

Normaly it should just spawn my player camera and set the player object as the target for cinemachine.

teal viper
jaunty junco
#

This gets executed. But for some reason gets imidiatly destroyed and I cant trace back from where and why

jaunty junco
teal viper
jaunty junco
#

OMG I GOT IT THANK YOU SO MUCH

#

One of my team members made the player camera a singleton. And didnt do a propper cleanup on destroy. So it deleted the new camera everytime.

#

IM GONNA BEAT THIS FUCKER

#

THANK YOU SO MUCH

strong tendon
#

How to improve performances with +1000 navmeshagents

ivory flower
#

why its not show game over when character tuch colider but its only show game over when character jumo and tuch top side of cloider

hexed terrace
ivory flower
hexed terrace
#

I've explicitly told you what the issue is. Why are you messing with gravity? 😄

ivory flower
#

why unity code work but not my

hexed terrace
#

That won't work.

ivory flower
hexed terrace
#

Well, CollisionEnter.. might not check the ground if your walking along it as it called it once. Then calls it again when you hit the obstacle

ivory flower
#

still not work

hexed terrace
fast fern
#

how do I refrence this in code?
I want to switch between objects when clicking a button

hexed terrace
ivory flower
#

that mean unity teacher lie to meatwhatcost notlikethis

eager stratus
#

Just to make sure my understanding of LateUpdate is absolutely correct, it's an event that only triggers after all scripts in the scene have completed their Update functions, correct? If so how can I accomplish something like this but for FixedUpdate?

teal viper
eager stratus
teal viper
eager stratus
teal viper
teal viper
#

And even more so if you also need to modify the gravity direction.

azure hemlock
#

anyone using vs2026? the intellisense is broken and nothing works?
can someone confirm

#

this is what i get

hexed terrace
#

I've seen one other person talk about VS2026, and they didn't mention any problems with intellisens - even saying this version is quite good and to check it out

cosmic dagger
hexed terrace
#

but why would you?

charred spoke
#

That would be composition based design. Our move and jump scripts for enemies are seperated

tribal otter
#

Hey guys. I'm having an issue with inputs and none of my solutions have worked to solve it. When I start the game, the first time you press pause using Esc(Player input map for pause is bound to esc and I) pause and resume (bound to Esc in the UI input map) both fire, so it appears to the player like nothing happened. It works fine 2nd press onwards or if you initiate pause via I.
I've got a game start initializer that runs a foreach loop to disable all the action maps and then the player map is enabled, and my debug log confirms the input map is set correctly. My input map switcher debugs confirm switching is happening when pause/ui open events happen and their states are correct at the time of the first pause being initiated.
I have call stacks showing both pause and resume are firing from the same input, despite only one action map being active. I've tried a coroutine in my pause state handler to delay the pause bool check in case it was just checking out of date states and it didn't solve it; I've double checked the documentation and confirmed all my inputs are set correctly, so I don't understand why despite the action map being set to player, the UI one is firing, and why it only affects the first attempt.

Any thoughts would be greatly appreciated.

rocky canyon
# tribal otter Hey guys. I'm having an issue with inputs and none of my solutions have worked t...

first thought, just wait a frame

void Start()
{
    StartCoroutine(EnableInputsNextFrame());
}

IEnumerator EnableInputsNextFrame()
{
    yield return null;
    playerMap.Enable();
}``` second thought has to do with the Event System and `Input System UI Input Module` component (as seen in image)
if so, it might be that, that is getting the rogue input (maybe try disabling the component during a quick test and see if it changes the outcome)
-# that's about all i know about the new input system, sorry.. just hopped on and seen the question.. figured i'd start my day by googling a bit.. and this is as much as i can come up with..
-# maybe check out [#🖱️┃input-system](/guild/489222168727519232/channel/763502300781477948/) for more specialized responses 🍀
tribal otter
# rocky canyon first thought, just wait a frame ```cs void Start() { StartCoroutine(Enable...

aye, I tried the wait a frame idea- for whatever reason the first press of esc is firing for both inputs at the same time, so there's no waiting doesn't work, it's like until you've pressed a key, it doesn't matter what input map is "active" or how long you wait, it will register on all of them and only after that will it actually take notice of the map selection (as best I can think to explain it anyways)
I did try fiddle with the input system UI input module and the input action panel and it started firing off warnings about them having to be set a certain way or risk UI inputs not working, but even with ignoring those warnings it didn't change the 1 press 2 action maps fire, so I put it back to what it was.

Didn't know there was an input system channel (isn't on my list) so I'll pop over and check there, thanks o7

blazing solar
tribal otter
wintry quarry
blazing solar
#

Can you show us your code setting up the inputs

wintry quarry
#

The standard workaround is waiting a frame

whole linden
#

Hlo seniors greetings from me I never used c# so can someone have any notes that can give me some basic grab so my brain can get motivated (all is well)

#

Umm reply when you are free seniors I can wait (all is well)

slender nymph
#

again, there are beginner courses pinned in this channel

edgy sinew
whole linden
whole linden
#

Srry for my stupidity I thought it is in chat

hexed terrace
#

lack of knoweledge != stupidity

edgy sinew
#

⭐ hi all, what are your thoughts on "equipping" a Rigidbody object? (like to the Player's right hand or left hand etc)

Currently I have avoided setting the transform / rotation every frame, by simply Destroy() the Kinematic Rigidbody and SetParent to the Player hand_right. Obviously that's not fantastic - actually ultimately would prefer dynamic RB too.

Would it be valuable to have a child GameObject that has the Rigidbody - and disable that? I wonder when re-enabling if it would trip up the Physics system. Or is "Rigidbody on child GameObject" a no-no 🤔

Maybe I should just leave the Kinematic Rigidbody on and set transform every frame? But that feels inefficient.
Thanks.

wintry quarry
#

Is your player Rigidbody based or something else?

edgy sinew
#

the Player is a CC, but I have an RB version too.

#

Wait.

wintry quarry
rich robin
#

like for my old game with character controller i had "gravity" coming from animation root motion when i did not know what i was doing XD

hot wadi
#

U would likely have to stick to a kinematic RB in the case of weapon or similar
Kinematic RB does stick to its parent's transform

edgy sinew
#

@wintry quarry @rich robin @hot wadi Wait ... No, no it does not guys.

#

Kinematic RB does not stick, idk what you're talking about kekwait

wintry quarry
edgy sinew
#
itemToTake.transform.SetParent(rightHand.transform);
Destroy(itemToTake.GetComponent<Rigidbody>());
itemToTake.transform.localPosition = new Vector3(0.0f, 0.0f, 0.0f);
#

Okay, sure yeah. Maybe only in that case.

#

Can confirm - without Destroy the Rigidbody it doesn't follow correctly

wintry quarry
upper fable
#

Can anyone spot what ive done wrong here?

edgy sinew
wintry quarry
# upper fable

yes you are trying to compare a bool and a Vector3 with ==

upper fable
#

whoops

#

wrong image

wintry quarry
#

that's exactly what the error says btw

polar acorn
# upper fable

You are checking if m_playerInRange is equal to a position. A boolean is not the same thing as a Vector3

upper fable
#

This is what i was concerned about

wintry quarry
# upper fable

now you're trying to assign a Vector3 to a bool variable

polar acorn
# upper fable

You are setting m_playerInRange to a position. A boolean is not the same thing as a Vector3

wintry quarry
#

only bool can go in a bool

#

you can't put Vector3 data in a bool variable

#

bool is only true/false

edgy sinew
#

Pro tip: write out the goal of the code in comments step by step. Like

// Check if object is in range
// Assign object position to ...
// Whatever else
#

Then you might avoid, uh.. setting a true/false value equal to a transform.position

upper fable
#

Yeah im a very beginner beginner dev

#

so im just copying things as i go along

wintry quarry
upper fable
#

but this persons code works and mine doesnt

edgy sinew
#

As soon as possible, switch to "I actually know what this does"

polar acorn
wintry quarry
#

you copied his code incorrectly

upper fable
#

I sure did

polar acorn
# upper fable
"I did it exactly like the tutorial so why does theirs work and mine doesn't" counter:
Number of times it wasn't exactly like the tutorial: 194
Number of times it was exactly like the tutorial: 5
Number of times the code literally did not exist: 1
2022-07-19 to 2025-10-07
upper fable
#

OH GOD THERES A COUNTER

#

alright ill be back to fill in the rest of the 6

#

thanks yalls

hot wadi
edgy sinew
#

Thanks guys. I guess that makes sense, interpolate is never used for Kinematic RB anyway right? Since it's moved directly 🤔

hot wadi
edgy sinew
#

When interpolation or extrapolation is enabled, the physics system takes control of the Rigidbody’s transform. For this reason, you should follow any direct (non-physics) change to the transform with a Physics.SyncTransforms call.

Unity Scripting API - it seems the root issue is that Interpolation yields control of the transform to the Physics System. Physics.SyncTransforms syncs things back up

wintry quarry
#

well

#

it is used if you move the RB via MovePosition

#

but if you're moving it via moving its Transform parent then interpolation is just an impediment

hot wadi
#

I've never touched those settings so it's new to me too

edgy sinew
#

Wow that wasn't difficult at all. Unity rocks 🗿

warped meteor
#

I am just starting with unity and finished this flappy bird tutorial, he said to try and figure out how to make it so the bird doesnt score once you die, I use the same process that he did in the tutorial to reference another script but it is saying that the script cant be a logic script for whatever reason

#

heres the bird if thats of any help

#

I just need to reference the bird so I can have the pipe middle script check if the bird is alive

edgy sinew
#

Your Bird is of the wrong type

cosmic dagger
edgy sinew
#

It has to be a BirdScr ^ yeah

warped meteor
#

oh

wintry quarry
warped meteor
#

wait so they become their own type?

#

gotcha

wintry quarry
#

The variable is whatever type you write

warped meteor
#

Thanks

warped meteor
edgy sinew
#

They are only, the type that is defined

warped meteor
#

the funny red line is gone yay

edgy sinew
#

You can’t put a string into an int variable, same for a LogicScript into a BirdScript

hot wadi
#

Programming forces u to pay attention to small details

edgy sinew
warped meteor
#

For whatever reason I thought that logic script was the variable type for all scripts

cosmic dagger
hot wadi
warped meteor
#

Trying to mod silksong

#

but gotta learn unity first

edgy sinew
hot wadi
#

What kinda mod?

#

Bilewater Beastfly?

eternal needle
warped meteor
#

oh sorry

hot wadi
#

I should make a modding simulator game

#

Or discord mod simulator

warped meteor
#

Like a sort of management game?

edgy sinew
#

A game where you ban people who talk about modding games 🗿

warped meteor
#

And for every one you let slip through the game itself becomes more modded which makes it more difficult

edgy sinew
#

Your glasses fog up the longer you read the chat, then you can’t see at all

#

Papers Please ahh idea 😆

eager stratus
ruby spire
#

Hey guys, just a quick question:

Does UGS (Unity Gaming Services) Analytics require user consent like a pop-up message asking them if I can collect a few basic info?

ConsentState state = EndUserConsent.GetConsentState();
state.AnalyticsIntent = ConsentStatus.Granted;

I saw it automatically sends data to analytics like that in addition to what I would try to collect (map, game mode, kills, match length, etc.)

Event gameEnded {
  "batteryLoad": "",
  "buildGUUID": "",
  "clientVersion": "",
  "collectInsertedTimestamp": "",
  "eventDate": "",
  "eventID": "",
  "eventLevel": "",
  "eventName": "",
  "eventTimestamp": "",
  "eventUUID": "",
  "eventVersion": "",
  "gaUserAcquisitionChannel": "",
  "gaUserAgeGroup": "",
  "gaUserCountry": "",
  "gaUserGender": "",
  "gaUserStartDate": "",
  "gameBundleID": "",
  "idfv": "",
  "mainEventID": "",
  "msSinceLastEvent": "",
  "platform": "",
  "projectID": "",
  "sdkMethod": "",
  "sessionEndState": "",
  "sessionID": "",
  "timezoneOffset": "",
  "unityInstallationID": "",
  "unityPlayerID": "",
  "userCountry": "",
  "userID": ""
}

Thanks in advance!

cosmic dagger
# eager stratus In this case the problem is that I can't guarantee that gravity is applied after...

You can create a third Gravity script that has a reference for both the Move and Jump script with custom OnFixedUpdate methods (instead of using FixedUpdate). Inside of the Gravity script, call OnFixedUpdate for Move and Jump in the order you want, then apply/update gravity. Here's an example . . .

   public class Move : MonoBehaviour
   {
       public void OnFixedUpdate() { }
   }

   public class Jump : MonoBehaviour
   {
       public void OnFixedUpdate() { }
   }```
```cs
   public class Gravity : MonoBehaviour
   {
       [SerializeField] private Move _move;
       [SerializeField] private Jump _jump;
       
       [SerializeField] private Vector3 _value;
       [SerializeField] private float _scale = 1f;
       
       private void Awake()
       {
           if (_move == null) _move = GetComponent<Move>();
           if (_jump == null) _jump = GetComponent<Jump>();
       }

       private void FixedUpdate()
       {
           _move.OnFixedUpdate();
           _jump.OnFixedUpdate();
           
           // Apply gravity here. This is random code, BTW!
           _value = Physics.gravity * (_scale * Time.fixedDeltaTime);
           
       }
   }```
balmy vortex
#

hey so like how do you check if an object is colliding with another object continously? cuz stuff like OnCollisionEnter only checks for it once on the first collision iirc

earnest lion
#

whats the command to pull up the instructions to get visualstudio to autocomplete and highlight code properly?

earnest lion
#

in this discord i mean there was a bot command

naive pawn
#

!ide