#💻┃code-beginner

1 messages · Page 226 of 1

queen adder
#

Ur prolly right actully

#

It does look off

abstract pelican
#

Win+G record video

#

Alt+F9 Record video nvidia

queen adder
#

OBS is pretty standard lol

#

What is ur beef with my softwareangerjoy

abstract pelican
#

I had beef and pasta last night.

queen adder
#

Im having chicken and pasta tonight. We dining like kings out hereblushie

abstract pelican
#

chicken is very dry

#

Cue a good video on inventory so I can start building off of it???

queen adder
#

Whoever is making chicken for u is making it wrong then lmao. Chicken shouldnt be dry

#

Off topic tho lets stay on code

#

What type of inventory u plan on making? I think most ppl end up over complicating them they arent hard

abstract pelican
#

To have things sorted, a quick-access panel in the center, to be able to drag and drop items around the inventory, etc.

#

also to be able to put on equipment

#

like in Minecraft.

queen adder
#

Ive said this like a dozen times as of late but just use unitys UI interfaces to pick up mouse events

#

OnPointerEnter, Exit,etc

#

That shouldnt be to hard honestly. The only part of that i think might be complex is equipable items since they tend to modify data / stats on the player

abstract pelican
#

Because of this, I need some sort of base of movement and item equip.

summer stump
#

Slots could take something like an item interface to make it more flexible

queen adder
#

I would just use a enum personally

#

And a base class like Equipable

summer stump
queen adder
#

That way u cant drag in food items / potion items into the equip slots

#

And they can have a overrideble method like OnEquip() that way each equip item can have there own implementation

abstract pelican
#

How to make a folder and a script not conflict with the same name?

#

Invetory folder, Invetory.cs

buoyant spade
#

can someone help me with this

cosmic dagger
summer stump
abstract pelican
queen adder
#

You could just change the name of the folder? I don't think I've ever heard that issue tho

grizzled zealot
#

I've an object with many properties (e.g., health, ammo). If I have two scripts modifying the same property (e.g., damage, healing), how should I manage the value? Should I have all properties in a single script and then use observer or set/get functions to manipulate the value? Or should every script its own copy?

cosmic dagger
cosmic dagger
supple wasp
#

Hello, how can I make it not take so long to stop the car because it lasts a long time...

eternal falconBOT
supple wasp
timber tide
supple wasp
#

look this is the code

teal viper
thorn holly
cosmic dagger
supple wasp
polar acorn
supple wasp
summer stump
#

I don't use wheel colliders, but should you perhaps be stopping the motorTorque when braking?

#

It looks like it can keep getting set?

rare quarry
#

hey guys, im just curious: how can i make an octopus AI? I mean its gonna be large boss, Maybe it will shoot something later but its usual attack is melee (I mean with its tentacles)

verbal dome
#

Like what makes the octopus unique, and not just a normal enemy with octopus animations?

abstract pelican
#

such a panel should be in the same parent as the inventory so that I can move things there?

charred spoke
#

Provide more context

abstract pelican
rare quarry
abstract pelican
#

Does it all have to come with an inventory? So I can drag and drop things into the slots? Or can the inventory be created on a different canvas?

rare quarry
#

especially the tentacles

verbal dome
#

So that we can give hints on how to implement it

charred spoke
abstract pelican
#

and how does the different UI of an item get passed around in the first place?

charred spoke
#

What do you mean passed around ?

abstract pelican
charred spoke
#

I cant answer that since I have no idea how your quick slots nor inventory work

rare quarry
verbal dome
#

You can use a physics query at the tentacle's position to detect hits.

#

For example, Raycast, CheckSphere, SphereCast, depending on how you want to detect the hit

#

You can have a list of classes for the tentacles. The tentacle class could be a Monobehaviour on the tentacle, or just a plain C# class (not inheriting from anything) stored in the octopus script

rare quarry
native seal
#

what movement method respects colliders?
when I move enemies using transform.position = Vector2.MoveTowards(transform.position, target.transform.position, enemyData.Speed * Time.deltaTime); they all stack

rare quarry
charred spoke
#

Or a verlet integration of the positions of the bones

rare quarry
#

so it will be like: when ray hits to our character, tentacles joints are gonna grow longer and hit our character

teal viper
rare quarry
native seal
#

any way around that?

rare quarry
teal viper
rare quarry
#

3d

verbal dome
#

First you probably want a skinned 3D mesh for the tentacle - either separate mesh or part of the octopus

#

And then use animation and/or IK like Uri mentioned

teal viper
# native seal any way around that?

Collisions in unity are handled by the physics system, which in turn requires a rigidbody on moving objects. If you don't want to use rbs, you basically go against the unity physics system.

charred spoke
#
native seal
#

is the gist that each enemy checks a circle around it and moves away accordingly

teal viper
#

Probably quite a bit more complicated than that.

native seal
#

how do I stop an overlap circle from detecting itself?

#

when it is also detecting other things of the same type/layer ie enemies

verbal dome
#

Or use a layermask that excludes the layer of your collider

#

Or temprarily disable your collider

native seal
solid sail
#

I have a string "a", I need to convert it to int then use it in switch case.How do I do it?

teal viper
native seal
#

my game literally crashes lol

solid sail
#

The problem is switch case. whatever after case must be constant

languid spire
teal viper
native seal
#

200

#

think vampire survivors

teal viper
#

But I'd debug the crash properly if I were you. Unity shouldn't crash even with thousands of rbs.

languid spire
#

that's nothing, I have a game with 1,500+ rb running without problems

native seal
#

hm, not fully crashes but goes to 1 fps

#

on build I have to alt f4

teal viper
native seal
#

because when I remove them its over 200 fps

verbal dome
#

Are you doing something like cs foreach(var enemy in enemies) { foreach(var otherEnemy in enemies) { // ... } }

teal viper
#

Maybe your setup was just very inefficient

native seal
#

perhaps

languid spire
#

then there must be something seriously wrong with your setup or usage

native seal
#

the only thing the rb is doing is changing velocity in update

teal viper
#

So, you should debug the issue instead of nuking the whole physics system.

languid spire
#

what kind of colliders are you using?

teal viper
#

It's like burning your house because you found one cockroach inside

native seal
#

circle

native seal
teal viper
#

And now you have to rebuild your house and you don't even know how

#

Well, what part exactly about the rbs was expensive?

languid spire
#

first thing you can do is move your rb.velocity to fixed update

teal viper
#

It's really triggering me when people make wrong assumptions and just go with them...

native seal
#

even turning off movement caused lag when loading in the enemies

teal viper
# native seal seemed like just existing

That's very wrong. Nothing takes CPU time by just existing. Something in the physics system or your code was processing these rbs and using a lot of time. But you never investigated what it is.

languid spire
native seal
languid spire
#

so you are doing continuous interpolation, do you really need that?

native seal
#

no, but i totally forgot about changing the loop to fixed update

#

frames are better

languid spire
#

really you should only need continuous interpolation for very fast moving objects

native seal
#

gotcha

#

everything else on it fine?

languid spire
#

yes, if you could add some exclude layer overrides it would also help, so see if you can improve your layer usage

native seal
#

ironically the rbs improved performance because im no longer checking 100 colliders in one frame when the enemies are stacked up lol

#

my matrix is setup already doesnt that mean the overrides are fine as it is?

#

or do they do something different

languid spire
#

thats ok

native seal
#

thank you for the help

#

forgot about the fixed update

teal viper
#

For future reference, you should use the profiler to diagnose a performance issue before attempting random fixes.

languid spire
#

true ^^

native seal
sterile moon
#

I've been following Mikes Codes survival series just for core concepts, and I am having trouble with player movement. I can not jump when my players view is maxxed out to the clamping point

languid spire
#

the vast majority of people do not know what they are talking about when it comes to things like this @native seal

sterile moon
#

When the mouse y is clamped at max +-

queen adder
#

whats the best way to learn unity?

languid spire
eternal falconBOT
#

:teacher: Unity Learn ↗

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

native seal
#

circle colliders > box colliders generally right?

summer stump
# sterile moon When the mouse y is clamped at max +-

We're gonna need a lot more information. I don't know Mikes Codes, so I dunno how it is done.
I find it odd that the view is having anything to do with the movement?

Basic information needed:
Is this 2d or 3d
How do you move (transform, rigidbody)?
Is movement fine otherwise?

summer stump
native seal
#

kk

summer stump
#

I wouldn't say BETTER though, if that's what > means

native seal
#

better for performance

sterile moon
#

3D, transform, movement otherwise is fine, just jumping when the camera is at clamp

summer stump
native seal
#

since the shape doesnt really matter

#

when its super small

eternal falconBOT
summer stump
#

I am actually heading to bed now, but someone should help

teal viper
sterile moon
teal viper
#

But unity physics already is pretty optimized if you use it properly. There's no point discarding it(and rbs) with gameObjects workflow, unless you don't need physics at all.

summer stump
#

Very very odd that the view is affecting the jump. I don't see anything that should cause that

sterile moon
#

I'm also noticing that the characters goes slightly airborn when going backwards if I'm looking down

#

same thing if looking up, seems it launches towards the immediate forward point then gravity catches back up

#

Does anyone have just a solid functioning player movement script with move and jump that I could link in and see if its a straight up code issue or an IDE/Engine issue

teal viper
sterile moon
#

Yes

#

my plaeyer object

#

player

verbal dome
eternal falconBOT
verbal dome
#

Ah sorry you posted alredy

vernal plume
#

notlikethis tryna find where the mistake is when it isnt registered as an actual error is actually painful

verbal dome
#

It gets easier when you learn to write more maintainable code

#

And debugging

languid spire
#

And use the debugger to step through code

teal viper
# sterile moon Yes

Well, then it would make sense why it's going into the air. You're rotating it on the x axis and using it's transform.forward to move the character controller.

vernal plume
#

like rn im following this tutorial (part of a series), and his works perfectly fine but mine doesnt work at all despite not seeing a difference in our code

languid spire
#

can you screenshot the inspector for PlayerMovement @sterile moon

vernal plume
vernal plume
verbal dome
#

And is your camera in the hierarchy that you put into transform.Find

#

Because it's different from the tutorial

vernal plume
verbal dome
#

Did you properly set up that canBeShot layerMask?

#

Just make sure you follow all the steps correctly. Re-watch it if needed

vernal plume
#

i beleive so

#

he set it to everythingn and then removed the player and weapon layers

verbal dome
vernal plume
#

which i also did

vernal plume
#

it seems to be referencing these lines

languid spire
#

So your transform.find is not working

burnt vapor
#

The importance of properly sharing the issue

languid spire
#

yep, 5 posts before sharing a very obvious error

vernal plume
#

since the camera holder isnt parented to the player like his is

#

do i just reference the cam and not holder/cam

languid spire
#

there you go

sterile moon
#

@languid spire

languid spire
#

the question is why is it not set in the inspector? why does it need the transform.find?

languid spire
sterile moon
#

Thats what I thought too

#

but for some reason it does not work right

#

@languid spire do you have a standalone move script I can drop in with little modification to see if its a client side issue or a code issue?

languid spire
native seal
#

do couroutines instantly finish when on an object that's destroyed?

burnt vapor
native seal
#

makes sense

topaz thistle
#

Hello Everyone! I'm trying to create a game where the user shoots hoops and score points, it is a 3d game where the player walks around, can hold the ball and shoot hoops, although I am having a few issues during the creation. Has anyone run into an issue where your player moves toward a gameobject (in this case, a basketball) and as soon as the player has contact, the player automatically moves in a weird direction. Could this be because I am using transform.translate in my movement script?

queen adder
#

wait can i set an IEnumerator to private

verbal dome
queen adder
#

yeah i tried it and am getting an erro

#

error

verbal dome
#

Ok

static bay
topaz thistle
verbal dome
burnt vapor
topaz thistle
verbal dome
#

Only move rigidbodies via the rigidbody (AddForce, MovePosition, .velocity...), not via the transform

verbal dome
#

Why do you need that if you are moving via AddForce anyway?

topaz thistle
queen adder
static bay
verbal dome
#

@topaz thistle If you want 'instant'/snappy movement, you can directly modify rigidbody.velocity instead of AddForce

sterile moon
#

It makes the field inaccessible outside of the class its in

queen adder
topaz thistle
sterile moon
#

It makes it private, giving it privacy so other classes, objects, files, etc. can't touch it. useful for when hiding things or showing things to an API

static bay
queen adder
#

wwhen i click on the error it redirects me here

static bay
#

Aka if you made that Enumerator private, and it's giving you an error, that's likely the issue.

queen adder
#

so should i set it to public?

rich adder
sterile moon
#

I know my shit quite well, have run Java and C# before, just never run with the Unity library

static bay
rich adder
#

maybe, we need to see more

burnt vapor
eternal falconBOT
static bay
queen adder
burnt vapor
#

No it's not

languid spire
#

you can see from the mismatched } it's an inline method

burnt vapor
#

And after your configured your editor please google c# access modifiers

rich adder
#

its the opposite

queen adder
burnt vapor
native seal
languid spire
rich adder
rich adder
static bay
#

I legit can't get VSCode to work with Unity.

#

Ok let me rephrase.

burnt vapor
#

If you are on Windows I suggest you just use Visual Studio

native seal
#

vs community is better anytway

rich adder
static bay
#

HUH?

rich adder
#

hell yea!

static bay
#

FUCK HE'S RIGHT

#

😔

rich adder
#

have you tried the new Unity plugin for it?

static bay
#

Ya I have.

topaz thistle
burnt vapor
#

@queen adder So please configure your !ide or consider using Visual Studio if you're on Windows. VS is much easier to configure and VSCode is generally kinda bad at doing things.

eternal falconBOT
rich adder
topaz thistle
rich adder
#

so much easier than using the old method

static bay
#

I think the last time I tried it, I was able to get it working. It's just I had issues where copy-pasting code would lead to freaky formatting issues.

topaz thistle
#

I've gotta ask, is there any difference between installing VS through Unity Hub or Manually?

static bay
#

So I just said fuck it and went back to Visual Studo.

rich adder
timber tide
#

VSCode is great

#

for shaders

queen adder
rich adder
#

or shell out for rider

static bay
#

Did Apple do a dumb again?

rich adder
#

because its old xamarin editor

burnt vapor
#

VS is probably hacked together to work on Mac

rich adder
#

they prob consolidating

topaz thistle
#

So, I've got a Mac and am using manually installed VS

#

Should I switch IDE's or smth?

rich adder
#

It will still work, they just wont update it anymore. Just patches

static bay
#

Is there any advantage to working with VS Code as opposed to VS when it comes to C# + Unity?

#

On Windows

rich adder
#

more lightweight

#

thats about it

timber tide
#

it uses less than a gig for me

static bay
timber tide
#

and it looks nicer :)

burnt vapor
static bay
#

I like how VSCode debugging looks.

#

I like seeing all the variables in scope.

rich adder
#

same

verbal dome
timber tide
#

vs plugin for HLSL doesn't highlight correctly for me, but other than that there's no intellisence or anything

#

just clean shader code syntax <3

static bay
#

Then pasting it

#

Tabs dont get cleaned up.

verbal dome
rich adder
static bay
#

Gets especially bad when you paste to a scope with a different number of tabs.

rich adder
#

i dont like that it doesnt format yes, but you can press ctrl K + ctrl D

#

"Format Document"

static bay
#

Every time?

verbal dome
#

I format document all the time

rich adder
#

trying to find a way to make it auto lol

static bay
#

Wait this is intended behaviour?

#

No

#

No that cant be right. I worked with Javascript in VSCode and it formatted fine every time.

#

No way this is base behaviour.

languid spire
static bay
queen adder
#

oh god i just configured vs and there are so many errors

rich adder
verbal dome
static bay
static bay
#

the mad lad

#

where dis at?

rich adder
rich adder
queen adder
#

the thing is if i remove the IEnumerator from the update i get like 10 errors

static bay
#

well at least you're being told stuff is wrong now

#

progress

rich adder
#

ahh alt shift F works on mac too @verbal dome

static bay
#

here we go

queen adder
#

wwait so should i remove the IEnumerator from the update?

static bay
#

yes

rich adder
timber tide
verbal dome
#

Alright, I'll check it out next time I have to touch HLSL. Recently I mostly used Shader graph and Compute shaders

queen adder
#

wait what is a namespace error because i have way too many of them

static bay
#

Compute Shaders are so cool conceptually. I gotta get into those.

rich adder
#

now you're on vs

queen adder
#

yes

rich adder
#

before you showed vscode

queen adder
#

i wwas told to switch

languid spire
static bay
verbal dome
#

Or is that cropped

#

I guess it is

static bay
#

They hold us back.

rich adder
#

yes prob missing a curly brace

queen adder
#

whats the command for hastebin?

rich adder
static bay
#

@rich adder You mentioned some new Unity VSCode extension?

static bay
#

ye I got it

static bay
queen adder
#

ive copy pasted the code into hatebin how do i export it

static bay
#

But now it takes 2 Ctrl+Z to undo it 😛

rich adder
static bay
#

because the paste comes in

#

THEN it formats

#

actually unusable

rich adder
#

:\

static bay
#

I joke. It's fine.

#

I'll give it a try for a day.

#

See if it feels good.

#

Thanks regardless 😛

queen adder
languid spire
#

yes

queen adder
static bay
#

it's empty

#

wait

#

it's just hastebin

verbal dome
static bay
#

you need to hit save, then copy the link

#

On the topic of IDEs, Rider any good?

queen adder
#

ive saaved it is it supposed to show a name option?

verbal dome
queen adder
languid spire
static bay
verbal dome
static bay
#

He has made it more clear

rich adder
#

remote desktop is next

verbal dome
#

I was hoping we don't need a video tutorial for this one

#

Maybe they hit Ctrl + S in the browser. Who knows

queen adder
rich adder
#

lol

queen adder
#

why

static bay
#

It's not possible

languid spire
#

omg

rich adder
#

just use another site then..idk

#

!code

eternal falconBOT
static bay
#

Honestly how big can this class possibly be?

#

Can he just copy-paste the whole damn thing into discord?

queen adder
#

here

rich adder
#

better learn to do it right

static bay
#

We're so back.

queen adder
#

im so sorry idk why it wasnt working

static bay
#

wait

teal viper
rich adder
static bay
#

I'm going to assume the top part of the code is copied and the bottom is their own?

rich adder
#

probably

rich adder
#

don't cram everything into one file

#

you see how messy it gets

queen adder
#

yeah

languid spire
#

no wonder the formatting is crap, that is not correct c# structure

#

I'm confused, you already had an Update method, why make another one?

static bay
#

I'm going to assume he got this script from a Tarodev video, wanted to add a dash to it and has been trying to do so without getting a hold of the fundamentals.

languid spire
#

yep, seems about right

#

@queen adder What is your coding background?

static bay
#

By the way we're not trying to blast you.

languid spire
#

so, best to go do some basic C# courses

static bay
#

Agreed.

queen adder
#

any recommendations?

languid spire
queen adder
#

okay thank you so much

static bay
#

Once you know the syntax and general flow, it'll be much easier to make sense of the tutorials, and figure out what you need to do to get the behaviours you want.

opal portal
#

Hello there, i've just started today with unity, i've been checking some code (mostly for movement and physics), and dont understand why people use Update + Time.deltaTime instead of ussing FixedUpdate for movement like gravity (?

timber tide
#

because those people are wrong :)

opal portal
#

lmao xD k tnks

verbal dome
#

Were they using CharacterController?

opal portal
#

yup

verbal dome
#

AFAIK that is supposed to be moved in Update with deltaTime, yes

#

With Rigidbody and other physics related stuff you should use FixedUpdate

timber tide
#

wouldnt you still do it in fixed update though?

opal portal
#

what's the difference using Rigidbody and CharacterController (except that Rigidbody automatically does gravity and mst of collisions)

timber tide
#

Because this goes back to my previous problem that frame skipping breaks cc if they fluctuate too much but then again I've only done limited testing with it

verbal dome
#

But it doesn't have interpolation so it might be slightly choppy

#

But fixed is more consistent ofc

pallid nymph
#

FixedUpdate is probably gonna be laggy/weird as CC is not interpolated

verbal dome
#

If I were to use CC, I would probably do FixedUpdate and interpolate manually

#

Having movement tied to framerate in any way is sketchy to me

pallid nymph
#

I'd check what's the recommended approach in the docs for CC and use that 😄 And only worry about it later if I have issues

timber tide
opal portal
pallid nymph
#

Non-kinematic RBs tend to be annoying for character controllers as they do a lot of non-snappy stuff. And doing a kinematic RB CC yourself is on the difficult side.

verbal dome
#

Non-snappy stuff sounds like you are using AddForce and not taking current velocity into account

pallid nymph
#

AddForce is taking current velocity into account. Problem is you need to start manage velocities yourself.

verbal dome
#

I like to do this: cs Vector3 desiredVel = ... Vector3 currentVel = rb.velocity; Vector3 difference = desiredVel - currentVel; rb.AddForce(difference * someMultiplier)

#

Use the difference to target velocity as the force

pallid nymph
#

Then the next thing is lets say you want stairs, now you need to do more stuff to support that so that the RB doesn't just get blocked by the stairs

#

And suddenly you're doing all the stuff yourself - which gives you best control but is high effort

#

Whereas the default CC just handles most of it

verbal dome
#

While the usual AddForce(moveInput) is really floaty

pallid nymph
#

Agreed, forces are only good if you're doing proper physics stuff. As in, you have balls and cubes and stuff and want them to behave physically correctly.

frigid flume
#

hello ! i'm a complete beginner and i have a question : what's the best way to change a text between two scenes ? (that stays until another modification). I have a button that leads me to a new scene when i click on it. on that new scene there is another button, i want that when i click the first button from the first scene changes his text :) thanks in advance

timber tide
#

I've more respect for RB after dealing with accumulative forces and not clipping through every wall after testing a few things

pallid nymph
#

For CCs you end up fighting the RB more than being helped by it :/ (or at least that's been my experience)

languid spire
pallid nymph
#

mm... store the value in a global place and read it from the other scene

frigid flume
#

i think for me the global value is the better option since there will be a lot of these but how do i store something in a global place

pallid nymph
#

can you tell us a bit more about what are you doing? what's that all about? 🙂

frigid flume
#

it is an app (for the moment there is a main menu with buttons that leads to other menus) each menu gives you sort of challenges, and when you complete a challenge it gives you points for the specific menu score

#

should i use this


public class GlobalVariables : MonoBehaviour
{
    void Start()
    {
        // Load the global score from PlayerPrefs, defaulting to 0 if it doesn't exist
        int score = PlayerPrefs.GetInt("GlobalScore", 0);
        // Assign the loaded score to your global variable
        GlobalScore.globalScore = score;
    }

    void OnDestroy()
    {
        // Save the global score to PlayerPrefs when the object is destroyed
        PlayerPrefs.SetInt("GlobalScore", GlobalScore.globalScore);
        PlayerPrefs.Save();
    }
}```
pallid nymph
#

Perhaps not. This saves across sessions. If that's what you want- it's an option.

frigid flume
#

yes it is what i want, it's gonna be the player's score forever

pallid nymph
#

Yeah, but is it the same for the button thing you mentioned?

frigid flume
#

once gained the point stays (unless removed by another script)

pallid nymph
#

Okay, so this is good 👍

frigid flume
#

thanks i'll try it :)

frigid flume
# pallid nymph Okay, so this is good 👍

do i have to create a script for every button that gives a score ? every button gives a point for a different score (strenght, stamina,...) is there a way to have one script that can be attached to all buttons ?

#

like "if examplebutton pressed give one point to example"

verbal dome
#

You can have just one script but make a variable for what score type it is

pale vault
#

How do you make variables remain even when changing scenes?

frigid flume
verbal dome
#

For example, make an enum for your score typescs public enum ScoreType { Strength, Stamina ... }
And then the script that adds score, you would have a variable of ScoreType

#

´Then pass that scoretype as a parameter into the method that changes the score

#

Lets step back, how are you adding score currently?

frigid flume
#

i'm a big code noob it is my first time so i don't understand everything

frigid flume
acoustic crow
#

I need help; as soon as the resolution changes, sizes in the game also change. However, I want the game to look the same on all devices. How do I achieve that?

pallid nymph
pale vault
# acoustic crow I need help; as soon as the resolution changes, sizes in the game also change. H...

Select your Canvas GameObject (in the hierarchy panel).

Go to the inspector panel, and see the Canvas Scaler (The image down there)
Change the UI Scale Mode to Scale With Screen Size
Reference Resolution = 2560x1440 (because you are using a 1440p display, but I believe you can use whatever you want)

(Optional part. I personally like doing this)
Go to the inspector, and see the Canvas component

Change it from Screen Space - Overlay to Screen Space - Camera.

pale vault
acoustic crow
#

@pale vault and @pallid nymph i kiss you

pallid nymph
#

@acoustic crow Just to clarify though, it may be a bit more involved than that depending on the complexity of the menu. You need to assign proper anchors and pivots to the elements as well. And you should test with the various expected screen ratios. 🙂

#

But if it's just a few buttons in the center - that'll probably be good enough 🙂

acoustic crow
#

The problem is that it works perfectly with the “World” scene. My phone is 2960x1440
and I would like if someone has a cell phone with 4k or something that also looks like me in the "World" scene, then it works too, but in the "MainMenu" scene I have it the same as set in world, 2960x1440, but at 4k everything disappears and it doesn't work with the other resolutions. I'm confused @pallid nymph

stiff sapphire
#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
private string ad;
private int number=20;
void Start()
{
ad = "Eileen";
Debug.Log(ad);
Debug.Log(number);

}

// Update is called once per frame
void Update()
{
    
}

}

languid spire
stiff sapphire
#

how can ı do that?

#

ı just started learning unity

languid spire
#

also your script name and class name do not match

languid spire
pale vault
#

Or you can use the Add Component approach mentioned above

languid spire
#

but not until the naming problem has been resolved

pale vault
pale vault
stiff sapphire
#

It finally worked!!

#

thank you so much all you saved me ❤️

pale vault
#

No problem 🫂

stiff sapphire
#

ı did both the naming and adding component

pale vault
#

I suggest looking up some tutorials, but remember to TRY, or else you'll end up in somewhere called "Tutorial Hell"

pale vault
stiff sapphire
#

omg yes it's such a huge pain making everything the same but still getting errors

languid spire
eternal falconBOT
#

:teacher: Unity Learn ↗

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

languid spire
pale vault
stiff sapphire
pale vault
upbeat stream
#

chatgpt likes to invent functions in the unity api that don't exist though, just make sure to question it all the time lol

stiff sapphire
pale vault
#

Except I use Gemini instead becuase I prefer it

pale vault
stiff sapphire
pale vault
#

Can't really say it's better because I haven't really gotten into detail when it comes to comparison

#

One thing I can say is:

ChatGPT: Helps you with debugging
Gemini: Aggressively debugs it and even tries to change your code. But it doesn't mean I don't recommend it.

oblique ginkgo
stiff sapphire
#

ı mostly use them when ı get an error asking how can ı solve it but ı dont usually ask them to give me the full code or functions practicing always works better for me ,more efficient at least

pale vault
pale vault
stiff sapphire
#

still useful ı think just gotta find the best way for you to use it

pale vault
#

I personally think writing entire scripts using AI is not a good way to learn, and the code itself is also very unfunctional

stiff sapphire
#

agreed

pale vault
acoustic crow
#

When I play games on my phone I feel like the game is very sloppy but. It's fluid, but the things that move look strange. I don't know if it's due to too low FPS or no plan. What can I set in Unity's project settings to make it smoother?

pale vault
acoustic crow
#

@pale vault I don't know everyone either, it's a Samsung s10+ but of course it should run smoothly on other cell phones. It actually runs very smoothly. I just don't know if it's my imagination or what I don't like about the object. When I look at it, I feel like I'm holding on and then I see that there's a black film behind the picture

pale vault
upbeat stream
#

im on an s8 and most stuff works pretty well on that one, is it your game that works worse on the phone than in the editor? what's the actual issue

acoustic crow
#

wait i upload it on youtube and send you then the link wait a 5minute

pale vault
#

Wait, are we allowed to send links in this server?

acoustic crow
#

now i send this private

#

to you

upbeat stream
#

you should be able to share a youtube vid of your problem, but recheck the rules just in case 😄

#

seems like its fine
⚙️ Content
• Where applicable, attach supporting materials such as screenshots, videos, or code for better clarity and understanding.

pale vault
fathom mist
#

Hello! I was wondering how to edit my collider so my character doesn't rotate when coming into contact with one

upbeat stream
pale vault
#

(At least in 2D. Not sure about 3D)

#

Oh 2D yeah

fathom mist
#

oh! yes I see thank you

covert matrix
#

in my game i save a score to an inputted id using playerprefs which it does as seen in my debug statements, but in a different scene when i want to see the score of a id searched, it always says the score is 0

could use help resolving this, i think the issue is somewhere in the savescores() and OnSearchButtonClick() methods

https://gdl.space/poniyalusa.cs

upbeat stream
burnt vapor
#

Yeah it would help if you only share the relevant piece of code

upbeat stream
#

i'm guessing your issue is here:

PlayerPrefs.SetInt($"TotalScore_{studentID}", playerScore);
int lastRecordedScore = PlayerPrefs.GetInt("LastRecordedScore", 0);

saving to a different key than you are loading, not seeing where LastRecordedScore is saved ever

burnt vapor
#

So, do the ids of the students match?

#

Generally I'd advice you place the key in a constant to avoid mistakes with magic numbers/strings, but that does not seem to be the issue here so not something you'd have to do currently

covert matrix
hallow iris
#

i have a question how to make a negitive effect like a curse that only effects enimies in a game and not?

upbeat stream
#

and thats why i wanted the exact code 😄 was looking at the wrong place, can ignore the LastRecordedScore thing. agreed with FusedQyou, const strings all the way for pref keys

burnt vapor
burnt vapor
#

Unless you load the data before saving it

#

But that would have been obvious

hallow iris
burnt vapor
#

For example, with a manager that handles spawning

sterile moon
#
public Enemy enemy;
public GameObject target;
public bool curseObjectUsed;

if (curseObjectUsed && && target.isEnemy && enemy.inEffectRange) {
  // Attach effects
}

Super SUPER broad way of applying the effects, requires extra back end code not provided

burnt vapor
covert matrix
burnt vapor
#

Either way your first task would be to figure out how you tell enemies of the curse effect, and then you should actually differentiate enemies from players

upbeat stream
timid marlin
#

hi can someone please help me with something

sterile moon
#

Only if we know what it is

timid marlin
#

ofc

#
using System.Collections.Generic;
using UnityEngine;

public class CollectCoins : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    private void onTriggerEnter(Collider other)
    {
        if (other.name == "Player") 
        {
            Destroy(gameObject);
        }
    }


}
#

heres a script for a coin

#

its supposed to be destroyed one a player collides with it

#

but my player just passes through

keen dew
#

OnTriggerEnter is misspelled

timid marlin
#

omg

#

ugh

#

thanks

#

lol

sterile moon
#

@timid marlin to prevent any possible confusion I would suggest using other.tag instead of .name

    private void OnTriggerEnter(Collider other)
    {
        if (other.tag.Equals("Player"))
        {
            Destroy(gameObject);
        }
    }
#

You set the tag in the inspector window, very top, there's a preconfigured option for Player

pale vault
sterile moon
#

Compare tag would work just as well for sure, I'm weird and am partial to equals because it reads a little cleaner for me

pale vault
#

Wait a minute.
other.name is supposed to be about the name, not the tag, right?

frigid flume
#

hello ! coudl you tell me how do i link "ForceDisplay" to a text ?```public class ForceAdd : MonoBehaviour
{
public Text ForceDisplay; // Référence au texte où afficher la variable
private int Force; // La variable à incrémenter

void Start()
{
    // Charger la variable à partir de PlayerPrefs ou utiliser une valeur par défaut
    Force = PlayerPrefs.GetInt("Force", 0);
    UpdateDisplay();
}

void UpdateDisplay()
{
    // Mettre à jour le texte pour afficher la valeur actuelle de la variable
    ForceDisplay.text = "Variable : " + Force.ToString();
}

public void Increment()
{
    // Incrémenter la variable et enregistrer la nouvelle valeur dans PlayerPrefs
    Force++;
    PlayerPrefs.SetInt("Force", Force);
    PlayerPrefs.Save(); // Enregistrer les changements
    UpdateDisplay();
}

}```
the script goal is to add 1 to force value on click

pale vault
#

Is there GameObject.CompareName(string)?

sterile moon
sterile moon
frigid flume
#

so doesn't work with a legacy text ?

sterile moon
#

It probably would, but TextMeshProGUI is the modern integration and will usually carry logner term support without later risk of deprication

pale vault
frigid flume
#

ok thanks :)

sterile moon
teal viper
pale vault
teal viper
#

I don't see how..?

sterile moon
#

It's a reasonale method honestly, surprised it doesn't exist

frigid flume
sterile moon
pale vault
#

Actually, you can make it exist like this:

bool CompareName(string Name)
{
    if (Name == name)
    { 
        return true;
    }
    else 
    {
        return false;
    }
}
frigid flume
pale vault
timid marlin
#
using System.Collections.Generic;
using UnityEngine;

public class PlayerCollectCoins : MonoBehaviour
{
    public int points = 0;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }


    private void onGUI()
    {
        GUI.Label(new Rect(10, 10, 100, 20), "Poiddsfsdfadsfsdafadsfasdfasdfasdfasdfdsafsdfadsnts: " + points);
    }   



}

can anyone tell me why the gui label isnt showing up on my screen? thanks

teal viper
sterile moon
timid marlin
#

ffs

#

everytime

pale vault
frigid flume
timid marlin
pale vault
sterile moon
pale vault
teal viper
#

That's not why CompareTag is recommended

pale vault
#

Why is it?

teal viper
#

performance and human error avoidance

#

None of which is feasible with object names

pale vault
frigid flume
#

is it to add a component ?

sterile moon
#

its over in your inspection

#

You create a textmeshpro game object in the hiearchy, then name it, set it in the hiearchy where you want it, and link it by dragging it into the field on the inspection labled ForceDisplay

frigid flume
#

i don't think i am understanding how to do it even if it seems simple

sterile moon
#

Do you know what your inspector is

frigid flume
#

yes

#

but can't find forcedisplay, do i have to create one ?

#

it is only on my script for now

sterile moon
#

Okay, when you click on whatever game object has the script above, do you see a field that says ForceDisplay on the inspector that has no file in it yet

frigid flume
#

oh i havn't added the script on anything yet

wind phoenix
#

my player is jumping but it doesnt stay on track

frigid flume
#

was waiting for me to link text with display x)

sterile moon
#

Yeah, you need to have your script attached to a game object before you can link anything to it

sterile moon
wind phoenix
#

wait i send u ss

queen adder
#

how can I configure my IDE on linux kali? I have both installed

frigid flume
wind phoenix
#

@sterile moon

#

like this

#

its working fine on left and right input

#

but not jump

sterile moon
wind phoenix
#

my code @sterile moon

frigid flume
#

it may be related to that

sterile moon
#

its not related to that, but thats because you didnt finish changing text over to textmeshpro I bet. I can't read any of what that says because I do not speak French

frigid flume
sterile moon
#

so check your class for errors

#

it looks to be a NPE, and since you changed to TMP its most likely you didnt update all instances of text to TMP

frigid flume
#

well i can't find any remaining "text" anywere

sterile moon
#

nowhere on that button inspection do I see a script added

frigid flume
#

on click

#

where else can i add one ?

#

on click - no function - ForceDisplay

#

oh yes so i had to do "add component"

sterile moon
#

you create your ForcedDisplay game object and drag it here

frigid flume
#

this appared as i added the script as a component

#

so i guess it is good

#

but i can't add anything to that field btw

#

how can i drag something from one scene to another

sterile moon
#

to add something to the force dispaly field you need to have a text mesh pro game object to put in there. It wants a TMP object

hallow iris
#

dose any one know how this is made any detials videos or and readable metaril would be greatly appriciated

#

like how to select a ability in the start screen and then get it in the game

sterile moon
#

You would need to use a GUI or a keybind, some sort of trigger to get what they selected, then just implement that item into the game

hallow iris
#

i am new to game dev so i applogise in advance for my stuipd questions

frigid flume
queen adder
#

!configure

verbal dome
eternal falconBOT
queen adder
#

I have visual studio

#

it saya error acquiring .NET!

#

so doesnt autocomplete

#

I also downloaded vs externally

#

not via unity hub

burnt vapor
#

That's fine. Visual Studio downloaded correctly?

#

Make sure you selected the correct workloads

queen adder
#

Im using linux

#

vs tried to get net 7 on its own but failed

#

so im trying manually

queen adder
upper gyro
#

how do I get the path to the folder with the game (i.e. where the executable file is located)?

sterile moon
upper gyro
sterile moon
#

path = Application.dataPath;
burnt vapor
upper gyro
sterile moon
#

that might be dependant on how the game is installed then. May need to link into whatever distrobution manager you plan on using

languid spire
queen adder
#

Im installing .net 8 now

#

hope it works

languid spire
#

you know Unity does not use .Net 8, right?

queen adder
#

nah I didnt

#

it doesnt work anyway

#

oh its 7 cool

upper gyro
burnt vapor
#

Versioning in .NET is weird, Unity uses something called .NET Standard

#

Too lazy to explain but you can think of .NET Standard being the interface where .NET 7/8 is the class that implements the interface

#

Assuming you even know what these are

frigid flume
#

hey, i still can't manage to find a solution to my problem. I have a button on a scene that have to increase a PlayerPrefs value, and a text on another scene, where the game starts, that have to display that value. How can i do that ? i tried multiple things, i probably should use a DDOL but i can't manage to do it

#

this seems very easy but is unbelievably hard for me

#

and can't find anything on google

teal viper
frigid flume
#

i just cant manage to do that

teal viper
#

Doesn't sound code related.

queen adder
#

sdk net

frigid flume
#

don't even know where to start

languid spire
frigid flume
#

i deleted what i made since it was useless

languid spire
#

well make a new one

teal viper
frigid flume
#

is this a good script to add 1 to the playerpref value ```using UnityEngine;
using UnityEngine.UI;

public class IncreasePlayerPrefsValue : MonoBehaviour
{
public string playerPrefsKey = "PlayerScore"; // The key used to store the value in PlayerPrefs

}

void IncreaseValue()
{
    // Increase the PlayerPrefs value by 1
    int currentValue = PlayerPrefs.GetInt(playerPrefsKey, 0);
    int newValue = currentValue + 1;
    PlayerPrefs.SetInt(playerPrefsKey, newValue);
    PlayerPrefs.Save();```
shell sorrel
#

define good

hexed terrace
#

full of errors 😄

shell sorrel
#

i see no reason why it need to GetInt everytime

#

it can do that on Start and cache it, and increment the cache

#

also assuming its a bad copy and paste since it has a bunch of syntax errors

frigid flume
#

yes sorry

#

public class IncreasePlayerPrefsValue : MonoBehaviour
{
    public string playerPrefsKey = "PlayerScore"; // The key used to store the value in PlayerPrefs

    void Start()
    {
        // Increase the PlayerPrefs value by 1
        PlayerPrefs.SetInt(playerPrefsKey, PlayerPrefs.GetInt(playerPrefsKey, 0) + 1);
        PlayerPrefs.Save();
    }
}``` how about this
queen adder
#

do I need net sdk for autocomplete?

#

or net runtime

shell sorrel
languid spire
eternal falconBOT
#

:teacher: Unity Learn ↗

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

teal viper
eternal falconBOT
frigid flume
#

i used chatgpt to get thoses last scripts since what i was doing what trash

#

to have an example

languid spire
#

and you do not know the rules on using AI code?

shell sorrel
#

so you are not understanding the code it gives you then trying to ask others to fix it

#

vs reading it and learning what it does

frigid flume
#
{
    public Text ForceDisplay; // Référence au texte où afficher la variable
    private int Force; // La variable à incrémenter

    void Start()
    {
        // Charger la variable à partir de PlayerPrefs ou utiliser une valeur par défaut
        Force = PlayerPrefs.GetInt("Force", 0);
        UpdateDisplay();
    }

    void UpdateDisplay()
    {
        // Mettre à jour le texte pour afficher la valeur actuelle de la variable
        ForceDisplay.text = "Variable : " + Force.ToString();
    }

    public void Increment()
    {
        // Incrémenter la variable et enregistrer la nouvelle valeur dans PlayerPrefs
        Force++;
        PlayerPrefs.SetInt("Force", Force);
        PlayerPrefs.Save(); // Enregistrer les changements
        UpdateDisplay();
    }
}``` this is what i made
#

but since it wasn't made the correct way

queen adder
#

still doesnt auto complete

languid spire
#

but you said you were using TMP and I distincly remember someone telling to check all Text references which you said you had done

frigid flume
#

i used text legacy then tmp

teal viper
shell sorrel
#

yeah never use the legacy text system

frigid flume
#

but i was thinking i could link the text from a scene to the inspector's of a button froma another scene

shell sorrel
#

its literally just a using import and type swap to use tmp

#

you cant link across scenes like that from the inspector

queen adder
frigid flume
#

yes so i ask for help

queen adder
#

why is it damn hard to install net sdk 7 to linux

frigid flume
#

i was told to use a DDOL

teal viper
queen adder
#

not much resources

shell sorrel
#

since there is no insurrance all the scenes would be loaded at once

queen adder
#

wrong answer what

#

visual studio

#

and unity

teal viper
queen adder
#

yeah I use vs I thought that was obvious

teal viper
#

Which of the things that you listed is an ide?😬

languid spire
#

vs on Linux? I don't think so

teal viper
queen adder
shell sorrel
#

thats VS Code

teal viper
#

This is not vs

queen adder
#

yeah

languid spire
#

At this point you're just trolling

shell sorrel
#

yes MS is bad at naming things, but VS Code, VS for Mac and VS are all totally different things

queen adder
#

oh wrong aplication

queen adder
#

just started linux

#

I googled install visual studio for linux

#

and did that

#

here we are

teal viper
# queen adder

This looks configured properly though. I think. I don't use vs code for unity.

languid spire
#

if you don't know the names of the apps you're using then you should not be using them

shell sorrel
#

though i heavily recommend if its a option to use windows or mac as a dev envirmeoment for unity

teal viper
shell sorrel
#

linux support exists, but you will have less help with it, and its less stable

queen adder
#

okay

#

lets see

#

I go with visual studio only then

#

without code part

shell sorrel
#

Visual Studio is windows only IDE

languid spire
#

does not exist for Linux

shell sorrel
#

Visual Studio Code is a code editor for all platforms

queen adder
#

I see

#

so no way for auto complete then?

#

or seeing errors

shell sorrel
#

there is just follow the guide for the thing you are actually using

queen adder
#

yeah vs code that is

languid spire
#

but I strongly suggest if you do not know how to use Linux then don't use it

shell sorrel
#

VS Code is listed in the above

teal viper
queen adder
teal viper
#

For example?

shell sorrel
#

also being new to unity, programming and linux at the same time as asking for a lot of trouble

rare quarry
#

my character keeps going to movepoint after camera moves

first part of the video: normal movement script
second part of the video: tile based movement (a.k.a the ss i sent :P)

queen adder
#

doesnt auto complete gameobject

#

or rigidbody

#

or gamemanager button stuff like that

#

autocompletes stuff like private public readonly float int

teal viper
shell sorrel
queen adder
#

let me do it real quick

shell sorrel
#

so you followed the guide for the one you are not using, but expect it to work after that was pointed out?

queen adder
#

I didnt know

#

happens

rare quarry
#

basically this script updates character position after switching to next area but i don't understand why character tries to go back

#

FINALLYY

#

i solved it guys

#

sometimes i feel like dumb

queen adder
#

can i get help with my maze generator code please? I've made a node in 2d with 4 different walls and im trying to use a depth first search to do so but I keep getting these errors.

frosty hound
#

Miscounted, you have too many closing braces

languid spire
frosty hound
#

Nevermind, ignore me. I can't parse code that has { on the same line lol.

queen adder
languid spire
#

also don't nest methods unless it is useful

queen adder
#

because im trying to explore methods on doing so and which works best for what I am doing

shell sorrel
languid spire
shell sorrel
#

let start be its own method, then have the generate one as its own method too, dont put one in the other

queen adder
languid spire
#

first learn then do

queen adder
#

my first time using C# and i hate it tbh

summer stump
languid spire
eternal falconBOT
#

:teacher: Unity Learn ↗

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

shell sorrel
#

learning some of its basics, you got multiple syntax errors, that would be obvious after even a bit of introductory learning about C# or really any C like language

queen adder
#

thank you

queen adder
#

ill keep that in mind

dapper zenith
#

Why would my grid be so massive? this is default, on 1,1,1 and the 2nd image is if i make the grid scale values tiny.

low path
#

what's the size of you robjects?

#

and sprite import settings, etc

#

also camera settings

#

are you using an orthographic camera? could be that your grid is closer to camera than objects, changing relative size

dapper zenith
#

i am using othographic

#

i tried change the size but nothing changes

fathom mist
#

Does anyone have a good tutorial for adding a cutscene to a 2D game? I want to trigger an ending scene based on a specific pickup

low path
#

size of what?

dapper zenith
#

just the size value in the inspector that zooms it in/out

low path
#

what's the size of your game objects, and what is your sprite pixels per unit

#

and how large are your sprites

dapper zenith
#

nevermind i fixed it somehow..

low path
#

happy to help

dapper zenith
#

ty

low path
#

llol

tepid urchin
#

I'm moving my Rigidbody2D by changing velocity in FixedUpdate...

I noticed that without vsync the movement is horrible. Am I doing it in an ugly way?

pallid nymph
#

you'll have to better define horrible, buuut you maybe need interpolation on some rigidbodies

tepid urchin
#

well I mean horrible as in clearly bad practice for some reason, trying to educate myself 😄
I can just force VSync and looks good

#

but will look into interpolation stuff, thanks

pallid nymph
#

problem is that horrible is not descriptive, and whatever I say is a guesstimate

tepid urchin
#

yeah, fair enough

pallid nymph
#

is the camera moving choppy? are other objects moving choppy? (choppiness is entirely my guess here btw)... or it could be something entirely different

tepid urchin
#

anyways depending on monitor refresh rate, the character itself (whom camera follows) is choppy

position isn't updated smoothly (like it is with vsync) but "jumps" to new positions quickly

#

144hz is pretty much blurry, 60hz the "jumps" are slower/clearer

cosmic quail
#

interpolation should always be enabled for things like your player character

fathom mist
#

Quick issue, I have code that is supposed to load a new scene when I collide with something but I can't seem to trigger it? Should I post the code? It was tied to an empty game object with a collider and then rn I'm trying a specific sprite but neither of them are working

tepid urchin
#

seems like not, will do that
thanks

cosmic quail
tepid urchin
#

can try in handful of minutes, fiddling with my project during work 😄
but I'd guess it will make it all pretty

tepid urchin
#

loading level itself should be fine, as there is no fancy logic other than
SceneManager.LoadScene("name");

#

also adding interpolation indeed fixed my weird movement, thanks again guys

fathom mist
#

huhh I can't seem to figure it out?

#

My character is physically colliding with the object?

tepid urchin
#

then use OnTriggerEnter2D instead (or similar for 3D)
that doesn't collide "physically" but tells you when you went inside

#

ah you already are

verbal dome
fathom mist
#

It doesnt change anything if I mark it

verbal dome
#

Well it needs to be a trigger if you want to use OnTriggerEnter/Exit

frigid flume
#

could you explain to me how i can make this button be the ForceAdd Button please ?

verbal dome
#

Just hook up the method in the OnClick in the UI button's inspector

fathom mist
#

Yeah I get that now just I dont know why it just doesnt do anything other than let me walk through it

polar acorn
# fathom mist

The Three Commandments of OnTriggerEnter:

  1. Thou Shalt have a 3D Collider on each object
  2. Thou Shalt tick isTrigger on at least one of them
  3. Thou Shalt have a 3D Rigidbody on at least one of them
fathom mist
#

I have all that but 2D?

frigid flume
polar acorn
fathom mist
#

Do I need to change it?

#

Oh

frigid flume
#

i know how to hook up a script but a method

fathom mist
#

whats...the 2d method

verbal dome
frigid flume
#

how do i hook it up in the onclick button

polar acorn
fathom mist
#

nvm

tepid urchin
# fathom mist whats...the 2d method

there are tons of methods without any "3D" mention what won't work for 2D.. always good idea to check if "2D" one also exists if something doesn't work

frigid flume
fathom mist
frigid flume
polar acorn
frigid flume
#

yes it is what i thought :) but how can i drag it to the on click field ?

polar acorn
#

Drag in the object with the script you want on it, then choose that script and method

frigid flume
fathom mist
#

ok I changed the code but I'm still having the same issue as before. I said that it couldnt load scene 2 bc it wasnt in the build settings so I fixed that which got rid of the error but it's still not taking me to the next scene? I tried messing with the trigger effects and I added the proper tag on the player character ("Luin") Do I have to edit the tag on the frontdoor too? I tried replacing "nextSceneName" with 2 since that's the name of the scene I want loaded but that wasnt valid so I'm just at a loss rn

frigid flume
# polar acorn Why not

actually i have an object to which i added my script. i addes this object to the button

#

i can't choose anything

#

in function ?

polar acorn
polar acorn
fathom mist
#

ive tried with and without the is trigger

frigid flume
#

i have this but apparently it's wrong. I just want to link this or whatever to the UI button

polar acorn
frigid flume
#

what should i use

polar acorn
#

Your UI button calls a function when you press it. You need to make a function for it to call

polar acorn
frigid flume
#

does it call a function or a script ?

polar acorn
#

Neither object can be a trigger

polar acorn
fathom mist
#

yeah i've done it with both

#

neither of them work

frigid flume
#

how can i link the button to the function

polar acorn
frigid flume
#

sorry it's very dumb lol

#

but there is no function related to the button

#

i may have to write it in the script but what do i write ?

polar acorn
frigid flume
#

add 1 to a value

polar acorn
#

Then write a function that does that