#πŸ’»β”ƒcode-beginner

1 messages Β· Page 415 of 1

frank zodiac
#

what are some states i should put in my enum which keeps track of the turn based battle?

#

im stumped

errant anchor
#

Is it the settings that caused the speed changes after landing?

frank zodiac
tropic vault
#

like maybe FlavorText when there is text in between turns or Ended when displaying like gained stats after the battle

tropic vault
#

something like this

frank zodiac
#

somethnig like that but more visual

tropic vault
#

it really depends on what states you want

fickle plume
safe radish
#
    {
        float scale = ChunkManager.Instance.scale;
        float halfScale = scale * 0.5f;        

        int x = Mathf.FloorToInt((worldPosition.x + halfScale) / scale);
        int y = Mathf.FloorToInt((worldPosition.y + halfScale) / scale);
        int z = Mathf.FloorToInt((worldPosition.z + halfScale) / scale);

        return new Vector3Int(x, y, z);
    }``` I'm using this to convert my hit location to a gridposition but im getting different gridlocations back depending on which side of the voxel i'm hitting. is there something wrong with my formula or should i try subtracting the hit.normal to get a location more centered on the voxel?
errant anchor
frank zodiac
#

its the bare minimum

tropic vault
#

i mean this is plenty

#

also the = 0 etc. are unnecessary

#

they are assigned like that implicitly

frank zodiac
tropic vault
#

you should only use that when you need a different order

full kite
#

Hello guys! Can you tell me how to make a prefab child of a gameobject without using the normal? Instantiate(prefab, parentObject);

#

Because I used to spawn the prefab this command
Instantiate(Resources.Load("Lvl1"), transform.position, Quaternion.identity);

rocky canyon
full kite
#

Thank you sir!

rocky canyon
#

.transform.parent perhaps?

rocky canyon
# full kite

transform.parent or gameObject.parent its one of dem

full kite
#

transform,parent isnt

rocky canyon
#

what is it that ur instantiating?

#

a normal gameobject right?

full kite
#

!code

eternal falconBOT
full kite
#
var newObj = Instantiate(Resources.Load("Lvl1"), transform.position, Quaternion.identity);
        newObj.transform.parent = carpet1.transform;```
#

newObj is a prefab

#

carpet1 is a gameobject

rocky canyon
rocky canyon
#

but a gameObject does

full kite
#

damn bro

#

ur good

rocky canyon
#

ahh yes, Resources.Load returns an Object you need to cast it to the appropriate type

full kite
rocky canyon
#

aka GameObject

full kite
#

can you basically explain me a bit

#

what did you do

rocky canyon
#

i already knew how to set the parent by both methods... either .parent = otherGameobject.. and the SetParent() function

rocky canyon
#

what i wasn't aware of is that it returned an Object

#

once i learned that.. its easy to cast (GameObject)

#

same for other types of casts.. u just prefix the type in parenthesis

#

like u could cast a float to an int like : (int)myFloat; and that'd return an Int

#

soo after the reference is a gameobject it works like it alwys does πŸ‘

full kite
#

so what I spawn is a prefab or a gameobject?

rocky canyon
#

when u use Resources.Load it covers many things..(an asset)

#

u just have to make sure thats a gameobejct to set it as a child of another gameobject.. im not exactly sure why that is or even when i'd use Resources.Load

rocky canyon
#

b/c for it to be spawned in the scene it has to be a gameobject right?

full kite
#

indeed

rocky canyon
#

Resources.Load is designed to return a generic UnityEngine.Object because it can load various types of assets, not just GameObject instances. This allows Resources.Load to be flexible and versatile, accommodating different asset types such as textures, audio clips, materials, and prefabs. Since Resources.Load doesn't know the exact type of asset you're loading at compile time, it returns a generic Object, which you can then cast to the specific type you need.

#

heres an explaination ^

full kite
#

Thank you xfrosty_salut

rocky canyon
full kite
#

πŸ˜‚

#

thats what I called a W/W situation

rocky canyon
#

yessir

safe radish
#
    {
        float scale = ChunkManager.Instance.scale;
        float halfScale = scale * 0.5f;

        // Subtract the hit normal from the hit point to get a position more centered on the voxel
        Vector3 worldPosition = hit.point - hit.normal;

        int x = Mathf.FloorToInt((worldPosition.x + halfScale) / scale);
        int y = Mathf.FloorToInt((worldPosition.y + halfScale) / scale);
        int z = Mathf.FloorToInt((worldPosition.z + halfScale) / scale);

        return new Vector3Int(x, y, z);
    }``` subtracting the hit.normal fixed my issue
full kite
#

Im still re-reading what you wrote to understand more clearly

radiant frigate
rocky canyon
brave compass
rocky canyon
#

this is an Asset.. but it could be loaded using resources..

#

but its not technically a gameobject

#

so u couldn't set it to be a child of anything..

#

soo when u used Resources.Load (even tho u were loading a prefab) u had to implicitly tell the engine that it was a gameobject

rocky canyon
glass aurora
#

anyone know how to get these suggestions kindly tell me.

rocky canyon
#

w/ the <GameObject> part

full kite
#

ill like to it

#

right now

rocky canyon
eternal falconBOT
rocky canyon
#

configure ur IDE and u should get autocorrect / intellisense

glass aurora
#

i got all the suggestion and all works but still some arent downloaded

rocky canyon
#

are u using VSCode or VSStudio?

willow scroll
glass aurora
#

studio

rocky canyon
#

ya, studio should have all the stuff as long as u have the Unity Game Environment setup

glass aurora
rocky canyon
#

at the top of ur IDE in the left corner above the text does it say CSharpAssemb

rocky canyon
#

or does it say Miscellaneous?

radiant frigate
full kite
#

but urs is way more clealy

#

im also a c++ learner and ur code was more clearly for me cause I use the same thing in C++

glass aurora
rocky canyon
#

if u see Misc its not set up correctly.. if you see Csharp then it is

glass aurora
#

i have these

rocky canyon
#

ya, thats set up πŸ‘

glass aurora
#

can you tell me whats that

rocky canyon
#

ur probably using Transform when u should be using transform

#

capitalization woes πŸ˜„

glass aurora
#

what the hell now i have to find that Transform ?? and change it on every line

#

bro didnt worked

#

new one πŸ˜’

rocky canyon
#

read ur words homie

#

what in the heck is a trasnsform?

glass aurora
#

i dont know i am watching tutorial so i am following him

rocky canyon
#

he wrote transform i bet..

#

u wrote trasnsform

glass aurora
#

noooo!! my 10000$

glass aurora
rocky canyon
#

πŸ€‘

#

hell ya, i can take an early vacation

glass aurora
#

too sus!! i am thinking that you are in my pc!

rocky canyon
#

nah, just common mistakes most beginners have

glass aurora
#

no no no dont lie

rocky canyon
#

until they realize how important spelling and capitalization are

#

then it tends to happen less

glass aurora
#

ik you are in, so please make game for me πŸ™‚

rocky canyon
#

lmfao!

glass aurora
#

lmao c ya

rocky canyon
#

i been workin on my own one forever!

glass aurora
#

ahem ahem ...

ivory bobcat
glass aurora
ivory bobcat
#

The error is complaining about line 25

glass aurora
#

i love this discord server!! fixed βœ…

fringe tusk
#

Hello everyone. I got kind if a dumb question but how would I go about making a canvas persist across scenes. Do I need to attach a script to it with the don't destroy on load stuff or what. I'm trying to make some simple text ui and have 1 of em always persist and the other only exist in gameplay scenes.

willow scroll
fringe tusk
#

Oh ok I do have one so I need that to be a child of the canvas?

willow scroll
full kite
#

we just had to add (GameObject) to it

#

cause it was object and it couldnt switch from Object to GameObject

vast vessel
#

hey guys.
any idea why im getting an infinate loop?
its probably caused by the coroutine, since when i comment out the StartCoroutine and StopCoroutine methods on the lines 102 and 88, the editor hang.
it happens randomly.

keen dew
#

ShootLogic has an infinite loop if targeting system has a target but it's not in sight

vast vessel
#

ah youre right

#

thanks

radiant frigate
#

i have no clue why its ignoring them

vast vessel
#

!code

eternal falconBOT
vast vessel
#

sorry i wanted to get another paste bin link xD

near ridge
#

Is it normal that in this piece of code:

private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player") || other.CompareTag("Enemy"))
        {
            Debug.Log("triggered enter: " + other.transform.name);
            player.enemyList.Add(other.transform.parent);
            other.transform.parent.GetComponent<AShip>().OnDisableEvent += RemoveShipFromList;
        }
    }```

Even though there is only one enemy object with a box collider and rigidbody, I get "triggered enter: Ships" x 2 but only one object is added to enemyList?
scenic saffron
#

how do i cap fps?

near ridge
scenic saffron
#

thx

sharp abyss
willow scroll
near ridge
#

Thanks.
Just noticed that it it picking itself too since it meets those criteria lol

hallow delta
#

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

public class Movement : MonoBehaviour
{
public Rigidbody rb;
public float movementSpeed = 5f;
public float rightLeftSpeed = 5f; // Adjust for desired movement speed
public CharacterController cc;
public float jumpspeed = 10f;
public Animator anim;
public Transform groundCheck;
public float groundDistance = 0.4f;
public LayerMask groundMask;
public bool IsGrounded;
public bool isjumping;
public float crouchHeight = 0.2f;

private void Start() {
   anim = GetComponent<Animator>();
}
void Update()
{
    // Forward movement (unchanged)
    cc.Move(Vector3.forward * movementSpeed * Time.deltaTime);

    // Left and right movement with smooth transition
    if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.LeftArrow))
    {
        transform.Translate(Vector3.left * rightLeftSpeed * Time.deltaTime);
    }

    if (Input.GetKey(KeyCode.D) || Input.GetKey(KeyCode.RightArrow))
    {
        transform.Translate(Vector3.right * rightLeftSpeed * Time.deltaTime);
    }
    if (Input.GetButtonDown("Jump") && !isjumping)
    {
        transform.Translate(Vector3.up* jumpspeed * Time.deltaTime);
        anim.SetBool("isjumping",true);
        isjumping = true;
        StartCoroutine(jumping());
       
    }
    
    
}
IEnumerator jumping() {
        
        yield return new WaitForSeconds(0.75f);
        anim.SetBool("isjumping",false);
        isjumping = false;
        transform.Translate(Vector3.up* -jumpspeed * Time.deltaTime);
    }
    private void OnCollisionEnter(Collision other) {
        if (other.gameObject.CompareTag("obs"))
        {
            anim.SetFloat("die",3);
            rightLeftSpeed = 0f;
            jumpspeed = 0f;
        }
    }
    

public void FixedUpdate() {

if (Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow)) {

cc.height = crouchHeight * Time. deltaTime;
anim.SetFloat("crouch",3);

}
}

}
@eager spindle

glass aurora
#

how to fix it explain me whats going on.

remote osprey
#

Is there an horizontal layout group for colliders?

glass aurora
remote osprey
eager spindle
#

!code

eternal falconBOT
eager spindle
#

enough to flood chat

quick pollen
#

How can I draw a raycast/spherecast between 2 points? the documentation requires a direction and a distance, but I want to check for collision between 2 points

eager spindle
#

also it would be better if you asked more concise questions rather than "how can I improve this"

quick pollen
#

can you use that for physics stuff?

eager spindle
#

oh you want collision between two points

quick pollen
#

yes

#

basically take an initial point and an end point

#

and check if theres something inbetween

eager spindle
#

difference = vector2 - vector1

#

then raycast using vector1 and difference

quick pollen
#

what about direction?

eager spindle
#

difference is direction

quick pollen
#

hmm okay

#

ill try, thanks!

#

actually, how can I check what I found between those 2 points?

eager spindle
#

raycastall

quick pollen
#

hitinfo?

eager spindle
#

returns an array of collider

#

theres also spherecastall

sage mirage
#

Hey, guys! I am dealing with a problem. So, I am currently making stairs functionality for my player, actually I am using character controller and for one reason that's happening what you see in the video. I think I don't have any colliders there and I am not sure why my player continue moving forward and doesn't getting down the stairs as he did for the upper stairs.

eager spindle
#

its most likely that you have colliders there. could you select all objects in the scene(ctrl-a) and double check?
also when moving your player are you using charactercontroller's Move or SimpleMove?

#

your game looks great so far btw

quick pollen
#

how can I set it so it detects triggers without setting a layermask?

eager spindle
#

queryTriggerInteraction

quick pollen
#

yes, but i also need to set a layermask for it

eager spindle
#

what

#

didnt you just say you dont want to set a layermask

#

oen sec

quick pollen
#

yes.

eager spindle
#

this is the overload you should be using

eager spindle
#

just use the default setting of layermask.all

#

you can use 0 << 100

#

as the layermask

#

so it selects all layers from 0 to 100

#

dumb solution but it works

quick pollen
#

hold on

glass aurora
#

please anyone tell me why this is happening

brave compass
glass aurora
# glass aurora

i just followed the tutorial why this is happening tell me

languid spire
eager spindle
#

or the other way round

#

the one to select all the layers

brave compass
#

To select all layers, it would be the opposite of 0, or ~0, which happens to also be equal to -1.

eager spindle
sage mirage
eager spindle
#

im not sure what your gravity system looks like

quick pollen
#

something like this works? @eager spindle

            RaycastHit[] hit = Physics.SphereCastAll(chargeStart, chargeRadius, distance);
            foreach(RaycastHit hits in hit){
                if(hits.collider.CompareTag("Enemy")){
                    explosion.Play();
                    hits.collider.GetComponent<EnemyStagger>().TakeHit(500);
                }
            }```
#

also id kind of want like a capsule, not a sphere, now that I think about it

sage mirage
eager spindle
quick pollen
eager spindle
#

where is that distance in the spherecastall?

quick pollen
#

its set beforehand

eager spindle
#

as in where is it used

quick pollen
remote osprey
quick pollen
remote osprey
#

You can just ask on this chat normally, someone will respond you

eager spindle
#

ah kk distance is not the radius

#

misleading name

quick pollen
#

actually

#

theres a capsulecast

eager spindle
#

isnt a spherecast a capsulecast

#

oh its setting the points

#

this is news

quick pollen
#

I want to check if I hit anything in this line

#

I basically want to check all that space

glass aurora
#

i am new thats why

quick pollen
#

why does capsulecast have a direction variable if theres already a start and end point

eager spindle
#

itll help you understand a lot more

glass aurora
quick pollen
#

god I need gizmos for this

eager spindle
#

theres visual scripting actually

glass aurora
#

urdu/eng

eager spindle
#

what language

#

oh urdu probably not

glass aurora
#

hindi

#

and urdu are same

eager spindle
#

hindi definitely has

glass aurora
#

urdu and hindi are same

#

k bye

eager spindle
#

🫑

glass aurora
eager spindle
#

we all start somewhere

glass aurora
#

oh i see many courses at yt

quick pollen
#

yeah youtube is one

#

@eager spindle seems to work!

languid spire
# glass aurora at yt or where

!learn and, btw, you cannot learn to make games with Unity if you do not learn C#, so the advice you were given is totally correct

eternal falconBOT
#

:teacher: Unity Learn β†—

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

quick pollen
#

it also detects the player but its okay

eager spindle
quick pollen
#

altho itd be fun to see what the fuck its even doing

eager spindle
#

but yea c# is very important if you want to get anywhere

eager spindle
quick pollen
#

cuz idk what the capsulecast looks like

quick pollen
#

i still dont get why capsulecast requires a direction but yeah

short hazel
#

Think of them as thick raycasts

quick pollen
#

yes, that makes sense

#

but if I set a start and end point

#

which should create the "edge"

#

then why do I need a direction

short hazel
#

Because the CapsuleCast requires a direction

#

Start point + direction

quick pollen
#

if you have 2 points, and you draw a line between them, then isnt the direction already evident?

#

like maybe you can change if it does from a to b or from b to a

#

take the 2 points, draw a line between them, and then thicken it using the radius?

glass aurora
#

i beg please kindly tell me only this why this is happening

polar acorn
glass aurora
#

and i will learn

#

ik

#

how to fix

polar acorn
#

Look at the bit underlined in red (by the IDE, not by you) and fix it

polar acorn
# glass aurora that pechkus?

I have no idea what that means. But start at the top of the script and fix the red underlined things one at a time

glass aurora
#

listen

#

send code on private

polar acorn
#

You should only ever call CharacterController.Move one time per update per character controller

#

You should have one script handling both movement and jumping

#

If you try to do it multiple times, they will conflict with each other and mess up things like collision detection and ground checking

#

My guess is they're going to try to rope you in to spoonfeeding them the solution to their typo

digital kelp
#

Anyone know of a way to clear all subscriptions to an event such as this one?
researchButton.clicked += () => ResearchTech(tech);

polar acorn
digital kelp
#

researchButton.clicked = null?

polar acorn
#

Yes. That'll cause all the existing events to get garbage collected so it's not as good as everything unsubscribing itself when it is no longer necessary, but if you're doing it during something like a scene transition, the extra memory overhead won't matter much

#

Just don't clear it like, every frame, and you should be fine

digital kelp
#

Alright, ill try it out, thanks πŸ‘

polar acorn
#

Ah, you can't clear it from outside of the class. Events are weird, they're kind of both private and public. You'd need to do it in whatever class researchButton is

rich adder
polar acorn
#

You can make a public function that sets it to null and call that function

full kite
#

Can anybody help me with smthing? I got a prefab that its a child of a gameobject that has a pivot. He is anchored in a place. When I switch my resolution, the prefab is also moving in the screen. Why s that?

digital kelp
#

Button is a ui toolkit class

polar acorn
full kite
#

nope

polar acorn
#

You might need to keep track of the functions you add and remove them one by one

frank zodiac
#

why do i get errors?

rich adder
polar acorn
frank zodiac
digital kelp
polar acorn
frank zodiac
#

I dont understand

languid spire
polar acorn
full kite
remote osprey
#

What's the right way to set collision detection in 2d objects?

polar acorn
#

It will do quite a bit of good actually

frank zodiac
remote osprey
#

I have a 2d collider on each of my game objects with scripts in them implementing public void OnCollisionEnter2D(UnityEngine.Collision2D collision)

polar acorn
rich adder
remote osprey
#

nothing happens

frank zodiac
polar acorn
# digital kelp Real function?

Like I showed, an actual function with a definition, rather than an anonymous function that you lose a handle to once the function ends

polar acorn
#

call it literally anything else

rich adder
remote osprey
#

rifusbody?

polar acorn
remote osprey
#

Oh

remote osprey
frank zodiac
polar acorn
#

You are the one who assigns a value to the variable

frank zodiac
#

thanks

polar acorn
#

That's what = does. It tells the code what value the variable has

summer stump
# remote osprey I don't think so

Looking back it seems you are trying to get OnCollision working?
It requires a rigidbody. So if you do not have one, it will not work

remote osprey
#

Gotcha

summer stump
full kite
#

So I got a problem. I got a prefab that is anchored that is a child of another gameobject that is anchored and has a pivot in order to let that prefab to move. Even with all of those, when switching the resolution, he s still moving. Why s that?

frank zodiac
#

is there a way to make the variable name in a script different from the one in the inspector

polar acorn
frank zodiac
polar acorn
#

Sure but "Just pick a better name" is even easier

glass aurora
#

does anyone have a Fps movement wsad normal speed and jump etc and also mouse movement script.

summer stump
radiant frigate
#

quick question, is there any way of "stopping/breaking" a for loop if certain conditions are met?

radiant frigate
#

ty!

glass aurora
summer stump
glass aurora
summer stump
glass aurora
polar acorn
#

You've been given some great starting resources

#

that you should definitely look at if you're a beginner

glass aurora
#

you all means that learning C# will also guide me to make any kind of code like wsad moving etc when i press jump button so player plays that animation of jump etc..??

polar acorn
summer stump
#

I should tell you why to learn c#?

Because you need to in order to use unity....

polar acorn
subtle garnet
silk night
polar acorn
#

I'm not debugging spam machine output from someone who doesn't know the difference between a comma and a period

glass aurora
glass aurora
silk night
#

Yes and if you take that knowledge from chatgpt it will be meh at best and absolutely wrong at worst

summer stump
#

Absolutely wrong on average*

subtle garnet
summer stump
silk night
#

I have encountered chatgpt being usefull exactly once when i had a build error nobody had a clue how to solve it and after 2h of googling i decided, whatever might aswell ask it and it told me to delete and recreate a file that finally helped. Out of the around 10 other times i tried this I got no useful answers πŸ˜„

subtle garnet
#

Im here to answer questions and no one asks anything, just blames chatgpt.

glass aurora
#

is it necessary to download this well i already downloaded the development with unity

silk night
#

!ide

eternal falconBOT
glass aurora
#

nah tell me here!

silk night
#

read the manual

subtle garnet
glass aurora
silk night
summer stump
summer stump
glass aurora
subtle garnet
#

I don't see any active coding questions atm.

rocky canyon
#

everyones using chatgpt i guess πŸ™„

summer stump
glass aurora
#

hey please just tell me which website i should select for C# to make games

summer stump
rocky canyon
#

check the pins on teh channel ^

summer stump
#

Just configure your ide as shown above

#

And follow w3schools

upper yoke
#

Hey, so I'm trying to make a game work on Android and I have a code like that:

            var pressed =
#if UNITY_ANDROID && !UNITY_EDITOR
            Touchscreen.current.primaryTouch.IsPressed()
#else
            Mouse.current.leftButton.isPressed
#endif
            || _isClickAltPressed;
            if (pressed)
            {
                var mousePos =
#if UNITY_ANDROID && !UNITY_EDITOR
                Touchscreen.current.primaryTouch.position.ReadValue();
#else
                Mouse.current.position.ReadValue();
#endif

But somehow when I build things doesn't work at all, would anyone please know why?

keen trout
#

Can we

#

Play a unity project

keen trout
#

From command line?

rich adder
#

yes

upper yoke
summer stump
rich adder
#

also not a code question

keen trout
#

How

summer stump
keen trout
#

I'm noob pls help

rocky canyon
upper yoke
#

It's set to the new one

glass aurora
#

can i watch this?? or waste of time

rocky canyon
rocky canyon
glass aurora
#

yes or no

rocky canyon
#

more exposure == more better

rich adder
glass aurora
#

spoke broken eng

rocky canyon
#

nothing is a form of no

rich adder
#

these long format videos are horrid though

upper yoke
glass aurora
rocky canyon
#

just stop procrastinating and dive in

rich adder
rocky canyon
#

theres been tons of resources linked

verbal dome
rocky canyon
#

and theres pins at the top

keen trout
#

Anybody here more experienced in unity i want to make simple 2d games can anyone teach me

rocky canyon
#

^ tons of information

glass aurora
#

where

rocky canyon
#

the pins at the top

glass aurora
#

!learn

eternal falconBOT
#

:teacher: Unity Learn β†—

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

rocky canyon
#

top right of this channel

keen trout
#

Ya but learning alone is very boring

glass aurora
keen trout
#

And no one in my home is interested in games

glass aurora
rocky canyon
#

meh, i find it easier to learn by myself.. less distractions

glass aurora
#

i think i got a partner..

silk night
upper yoke
rocky canyon
silk night
#

in the build options should be an option on what device to start it

silk night
rocky canyon
#

this for sure

rocky canyon
rich adder
rocky canyon
#

ahh that trial experience πŸ˜‰

silk night
#

Also to your general problem, if you want to keep it simple you can enable touch using mouse events and then just using those, if you want a more elegant solution go for the input system, but thats a major refactor warning right there πŸ˜„

rocky canyon
#

he's already half-way there w/ the new input system

glass aurora
#

bruh he is directly teaching me about components

#

😦

rocky canyon
#

altho he's using it like polling and current? stuff

silk night
#

Oh yeah thought for a second its the old one

silk night
glass aurora
rich adder
#

i showed you where

glass aurora
rich adder
silk night
#

the screenshot you posted above, the 4h youtube video is very good

verbal dome
vast vessel
#

how do i find Vector3 vel?
(vel is rotated by angle degrease along the right vector)

glass aurora
rich adder
rocky canyon
# glass aurora bruh he is directly teaching me about components

https://www.youtube.com/watch?v=_cCGBMmMOFw&list=PLFt_AvWsXl0fnA91TcmkRyhhixX9CO3Lw&ab_channel=SebastianLague
this helped me when i first learning.. think of it as a crash course.. then once u get a feel for it move onto to something else

Welcome to this introduction to game development. We'll be starting from the beginning, so no prior knowledge of programming or the Unity game engine is required.

Unity can be downloaded here: http://unity3d.com/get-unity

Watch episode 01: https://youtu.be/9iCnjdXEfMA

If you'd like to support these videos, you can make a recurring monthly don...

β–Ά Play video
#

its a bit tamer and starts w/ fundamental conversational type info

rich adder
#

not big Sebastian Lague fan for these

glass aurora
#

what is bit tamer and w/fundamental conversationol type info

rocky canyon
#

watch 20 or 30 seconds of it and find out

glass aurora
silk night
rocky canyon
# glass aurora aok

its an entire playlist starts small and works it way up to making ur own prototype /game

summer stump
rocky canyon
#

its not a replacement for unity learn and the documentation.. but it helps wrap ur head around whats happening

verbal dome
rich adder
glass aurora
rocky canyon
#

2 years ago yes

rich adder
#

I have

#

its good

vast vessel
zenith cypress
#

spawn puts in the effort LennyThink

rocky canyon
#

moderate effort

rich adder
#

but honestly the microsoft one is the best c# because its just you and the console/compiler

#

no bs UI and other distractions

silk night
glass aurora
rocky canyon
rocky canyon
#

try to work along side of it when he starts getting into the engine parts

#

but the first few are just going over parameters/variables/methods/classes

rich adder
rocky canyon
#

all the basic stuff u need to know about

rich adder
#

roofing in july . RIP

silk night
rocky canyon
#

yea im lobster

#

gotta get that freelance on

rich adder
#

shit I'm willing to take that at this point in the market UnityChanLOL

silk night
rocky canyon
#

backends where its at

#

jobs dime a dozen

rich adder
#

yeah though those are mostly senior jobs

silk night
#

nah not another backend, im freelancing a backend gig rn and dont wanna do more in that area

rocky canyon
#

lmao i dont blame u brother

rich adder
glass aurora
#

bruh i cant understand anything

frank zodiac
#

dk if i can post this here or in #archived-game-design but basically im making a turn based battle system and every enemy has its own special attack pattern so should i just:

jam it all into one script
or make seperate scripts for each enemy or
make a script called EnemyAttacks

silk night
rocky canyon
#

follow an entire tutorial Flappy Birds/ Angry Birds clone

#

and then return

zenith cypress
#

Should probably watch more than 3 minutes

glass aurora
rich egret
#

I'm trying to run OnRoomListUpdate, but it says that entering the lobby in ConnectToServer makes it not work, where should I put OnRoomListUpdate? this's on Photon

rocky canyon
willow scroll
glass aurora
rich adder
zenith cypress
#

Ah ouch

frank zodiac
silk night
rocky canyon
#

i dont have any hindi resources unfortunately

#

subtitles hopefully do you justice

silk night
glass aurora
#

yep but i want detailed english

summer stump
willow scroll
zenith cypress
silk night
rich adder
zenith cypress
#

wait so it's a front-end that can also use react? Thonk How does that work? Is it like a weird layer on top of what they provide for you to use

rich adder
rocky canyon
#

i broke my arm on a Razor

#

wait.. nvm wrong Razor πŸ˜΅β€πŸ’«

zenith cypress
#

but it says it is a front-end πŸ€”

rich adder
#

oh maybe i'm confusing what a backend is ?

rocky canyon
#

i just found out you can use c# to build web apps.. like last week

#

isnt that awful?

rich adder
#

you can certainly use it to write backend, because thats how i'm using databases n whatnot

zenith cypress
#

Like NextJS is a backend framework that uses React as the frontend, but I am not sure what Blazor does if it seems to be both (?)

rich adder
#

yes blazor is similiar to nextjs basically

zenith cypress
#

Ah I see

languid spire
silk night
# rocky canyon isnt that awful?

why do you think microsoft is pushing typescript (and in parts react)? πŸ˜„

backend c# is fine, everybody i know that used c# in the frontend was like "never again"

rich adder
#

here is a blazor login im doing for a unity cloud account

#

made with tailwind

#

the syntax is basically html with c#

silk night
#

well that is basically vue at that point xD

rocky canyon
#

no offense but 🀒

#

html and css is my evil villan

silk night
rocky canyon
#

🀞

rich adder
rocky canyon
#

i use inline css >8)

rich adder
#

I mean thats why i use utility css like tailwind

#

so i write 0 css

#

i literally just copy and paste it

rocky canyon
rich adder
silk night
rocky canyon
#

to save urself from writing css containers all day

rich adder
#

copy and paste it works lol

#

tailwind and other utility css usually have premade components you can use , you write no code if you don't want to

#

I just switch up the items to actually c# array items etc

rocky canyon
#

i ofc use external css

rich adder
#

yeah screw that

#

writing a # for every little div

rocky canyon
#

yea bad workflow now-adays innit?

rich adder
#
#  listButton
#  listButton:Hovered
#  list-Button_darkmode 

etcc.

silk night
#

nah thats still normal if you dont have tailwind, but we might be a bit far offtopic here right now πŸ˜„

rich adder
#

true lol bringing it back to unity.. so um yeah using front end to login players of UGS via website

rocky canyon
#

my website is literally a file-tree

rocky canyon
#

thanks for the heads-up

rich adder
#

now its technically called Unity Cloud

rocky canyon
#

ohh ofc ofc.. that any good?

rich adder
#

its ..getting there..

rocky canyon
#

figured as much

rich adder
#

still lackluster on the web side

rocky canyon
#

got a good dashboard?

rich adder
#

yea

rocky canyon
#

welp thats enough for me to try it

rich adder
#

speaking of react I think its actually react

rocky canyon
#

better than finding a place to host my own

rich adder
rocky canyon
rocky canyon
rich adder
#

the UI is the same

rocky canyon
#

ahh gotcha

rich adder
#

they finally give cloud save their own section woot

rocky canyon
#

whats the speeds like?

rich adder
rich adder
rocky canyon
#

like data transfer.. no wait times or nothing negative?

rich adder
#

pretty quick so far

rocky canyon
#

nice.. im not a fan of ur dark reader πŸ˜›

rich adder
#

I only tried Leaderboards and cloud saving

rich adder
rocky canyon
#

i wish there were better ones out there

#

i ran mine for a while and had to toggle it off all the time b/c some sites were unreadible

rich adder
#

darkmode on cloud actually is decent

#

I just have dark reader on by defualt

#

the edges are more defined. But yeah it works well. The Leaderboards is good too, I mainly use it because its authentication already built into unity games

rocky canyon
#

yes ^ thats a 110% improvement

rocky canyon
#

im not going multiplayer.. but leaderboards would be coo.l

rich adder
#

working on a quick video on Leaderboards rn

rocky canyon
#

link me when ur done.. ill use ur implementation πŸ˜‰

rich adder
#

sure thing! I'm going to show both Anonymous login and Username/pass for auth a user

rich adder
rocky canyon
#

and he doesnt wanna get flashbanged

rich adder
#

wdym you never used High Constast on windows XP ?

rocky canyon
#

lmao.. no...

rich adder
#

it was all kewl futuristic looking!

#

afaik its meant for partially blind people

rocky canyon
#

yea, the bright ass lime green borders

#

chefs kiss.. (not)

rich adder
#

god I uused to feel real hax0r

rocky canyon
#

but its been calmed down a bit

rich adder
#

omg myb im steering this into titanic size offtopic

rocky canyon
#

i was waiting for Heco to post a question..

#

guess he figured it out

silk night
#

or you scared them away with the offtopic πŸ˜„

rocky canyon
#

perfect time to post a ? tbh.. u got 4/5 just itching to answer something

rich adder
#

*give me questions now! *

zenith cypress
#

Why? || Kappa ||

rocky canyon
#

imma get some work done.. i'll have questions as soon as i run into my first wall of the day

rich adder
rocky canyon
fickle plume
#

@rich adder @rocky canyon Take it to DMs next time

safe radish
#
    {
        Vector3Int positionToCheck = GetNeighbourPosition(cell, direction);

        if (ChunkManager.Instance.IsValidGridPosition(positionToCheck))
        {
            if (CellIsEmpty(positionToCheck) && !newFluidCells.Contains(positionToCheck))
            {
                Vector3Int positionBelow = GetNeighbourPosition(positionToCheck, Direction.Down);

                while (ChunkManager.Instance.IsValidGridPosition(positionBelow) && CellIsEmpty(positionBelow))
                {
                    positionToCheck = positionBelow;
                    positionBelow = GetNeighbourPosition(positionToCheck, Direction.Down);
                }
                MakeWaterTile(positionToCheck, newFluidCells);```   what am i missing in my logic here? i want water tiles to only be made on the lowest tile at their neighbours xz coordinate. but it keeps spreading horizontally
fickle plume
zenith cypress
#

What does GetNeighbourPosition do?

safe radish
# zenith cypress What does `GetNeighbourPosition` do?
    {
        switch (direction)
        {
            case Direction.North: return new Vector3Int(gridPosition.x, gridPosition.y, gridPosition.z + 1);
            case Direction.East:  return new Vector3Int(gridPosition.x + 1, gridPosition.y, gridPosition.z);
            case Direction.South: return new Vector3Int(gridPosition.x, gridPosition.y, gridPosition.z - 1);
            case Direction.West:  return new Vector3Int(gridPosition.x - 1, gridPosition.y, gridPosition.z);
            case Direction.Up:    return new Vector3Int(gridPosition.x, gridPosition.y + 1, gridPosition.z);
            case Direction.Down:  return new Vector3Int(gridPosition.x, gridPosition.y - 1, gridPosition.z);
            default: return gridPosition;```
zenith cypress
#

Maybe while (ChunkManager.Instance.IsValidGridPosition(positionBelow) && CellIsEmpty(positionBelow)) is not always running and then it places a water tile at the original position, instead of the lower one? πŸ€”

safe radish
fickle plume
safe radish
vale karma
#

Hello, Ive been working on a problem for a day now, I have to lerp the object using physics or it wont move the object correctly, the problem is, it doesnt "stick" once its done lerping. It seems to keep lerping once i pick it up endlessly.

fickle plume
#

Sometimes more visual debugging is easier. You can place a gizmo on the coordinate where current block is placed temporarily, then break point will halt it on that moment and you'll see current placed object. Or change color of it really temporarily and put break at that moment.

#

You can even just print out coordinates in the log of the current element placed, then you'll know their order.

#

Their order should tell you how the code executed and why extra blocks are placed.

fickle plume
vale karma
#

I have it swapping through kinematic when it needs, so its not fighting physics or jittery

rich adder
vale karma
#

it seems as if it has a second lerp on top of the tray lerp

#

Yes i heard that, so it doesnt ever really reach 0 right?

rich adder
#

yea it wont ever reach exact value and it varies on diff fps

#

something to look into for sure later on

vale karma
#

I tried jerryrigging it to do < 0.001f but it just kept doing it but at a greater cuttoff range. Im guessing MoveTowards needs to be used in tandum with it

rich adder
#

yeah , I usually use Coroutines for these lerps, or if i need a quickfix in update or something use
1 - Mathf.Pow(fraction, Time.deltaTime * 10)
part

frank zodiac
#

is there a way to make UI interact with physics

vale karma
#

ugh coroutines make my eyes hurt. I havent gotten used to using them correctly

rich adder
#

they are in completly different spaces

frank zodiac
rich adder
#

colliders are physics lol

vale karma
#

use a 3d object, worldspace UI, then put it on there and put physics on the object

rich adder
frank zodiac
vale karma
#

Yea its bad scaling stuff, gotta get width and hieght to match object. Probably easier way of doing it but htats how i do it if i need to

frank zodiac
vale karma
#

liike that google browser wityh physics lol

rich adder
#

you can fake it

frank zodiac
frank zodiac
vale karma
#

if its 2d yea

#

no ui tho

#

just collisions if its a GO

frank zodiac
rich adder
#

just use tweening libraries and simulate the falling, then use the Event System to raycast on them

frank zodiac
#

i need the player to be able to hop on the buttons too

vale karma
#

DOTween is free might be helpfull in your case

#

2d Colider with a sprite on it

frank zodiac
rich adder
#

i use tweening to animate the breaking pick

frank zodiac
vale karma
#

here i have a vid ofwhat your trying to do i think

rich adder
#

dotween is my top choice

zenith cypress
vale karma
frank zodiac
#

heres a reference of what im trying to do exactly, the stickman is the player and the thing on the top is the enemy. the player has to collide with stuff obviously but he also needs to be an image not a sprite so he can scale with the screen accordingly

zenith cypress
#

That center area could be a render texture in your ui

frank zodiac
vale karma
#

Yea its just a 2d cube with a collider, and an image slapped on it

frank zodiac
vale karma
#

that way you can move the object with physics, or transform

zenith cypress
#

A camera can render to a render texture, you can put that in a RawImage ui component

rich adder
#

its a texture that renders from your GPU

#

so a camera output can be used for example

frank zodiac
#

ahhh i see

frank zodiac
rich adder
#

or a mirror

zenith cypress
frank zodiac
#

thank you! that helps

zenith cypress
#

It's just what a camera sees (in this case), yeah

ashen sonnet
#

anyone with too much time feel like explaining a couple lines of code to an idiot (me)?

rich adder
slender nymph
ashen sonnet
#
        float targetRotation = Mathf.Lerp(-maxRotation, maxRotation, (RB2D.velocity.y + FlapForce) / (2 * FlapForce));

        transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler(0, 0, targetRotation), rotationSpeed * Time.deltaTime);

all the context you should need for this is that i have a maxRotation int var set to 45, a rigidbody2d var thats letting me access the velocity, a flapforce var set to 5, and i think thats it
im very very new to this and i am trying to re create flappy bird and this is intended to recreate that effect where when the bird is falling it rotates down proportionatley, my system so far has been to use a combination of google and chatgpt to get code that works, then figure out why it works (idk if its efficient but its working alright so πŸ€·β€β™‚οΈ ) but this code is way too big brain for my caveman cranium to comprehend

rich adder
#

first one just finds the target rotation to do a slerp (spherical lerping) on.

languid spire
ashen sonnet
frank zodiac
#

how is it pronounced?

rich adder
#

sleeerp

ashen sonnet
rich adder
#

7/11 sleeerpy

frank zodiac
frank zodiac
rich adder
#

RB2D.velocity.y + FlapForce) / (2 * FlapForce)

this is pretty much doing that math for the rotation . No idea where it fished those numbers from

ashen sonnet
rich adder
#

so if t is .5 then it would be 50% out of 0-100%

ashen sonnet
#

is t always a decimal?

frank zodiac
#

wait why dont coroutines show up here?
do i have to make a function to call that coroutine now? seems like a pain in the ass bcuz i have 12 of them

ashen sonnet
#

atleast always for when i would need to use it

rich adder
#

so only whole number would be 0 or 1

rich adder
frank zodiac
rich adder
#

I would never call Coroutines from any other scripts but its own (with a void method)

ashen sonnet
rich adder
#

the rest is just applying that rotation "smoothly"

ashen sonnet
rich adder
#

my math aint mathin today to explain how gpt came to that

ashen sonnet
#

how would you have done it ?/whats a way to get the same result in a way that is readable/makes sense

rich adder
#

if it works , I would not touch it

ashen sonnet
#

here i can give u chatgpts logic if u want (aka i asked it wtf it was thinking lol)


    RB2D.velocity.y gives you the vertical speed of the object.
    If the object is moving upwards, RB2D.velocity.y is positive.
    If the object is moving downwards, RB2D.velocity.y is negative.

Normalization Process:

    FlapForce represents the force applied when the object flaps (jumps or flies upwards).
    The range of RB2D.velocity.y is approximately -FlapForce (max downward speed) to FlapForce (max upward speed).

Offsetting and Scaling:

    Adding FlapForce to RB2D.velocity.y shifts the range from [-FlapForce, FlapForce] to [0, 2 * FlapForce].
    Dividing by 2 * FlapForce scales the range from [0, 2 * FlapForce] to [0, 1]. ```
rich adder
#

yes the first Lerp is normalizing the value

ashen sonnet
#

sorry if this is a dumb question
what that mean?

rich adder
#

well max length of 1

#

not necessarily 0-1

ember tangle
#

Whats the best way to track down the "AABB" errors?

vale karma
#

It has a small amount of jittering when moving, but im gonna have to move on if i want this game finished this year loll

rich adder
#

show errors

ember tangle
#

once I take away the reference I get about 15 unique AABB errors that dont point to the code

rich adder
frank zodiac
#

something insanely creepy just happened. chatgpt knew my function and method names even though i didnt give them to it, word by word, as its written in my script + its memory is erased. weird...

ashen sonnet
#

for now i wont touch my code for this bit and maybe ill come back later when i have more practise and when im not running off 3 hours of sleep in the last 24 hours lmao

rich adder
#

I would be very careful using gpt, especially as beginner

zenith cypress
# ashen sonnet sorry if this is a dumb question what that mean?

If you just wanted a t for y velocity you could do like (not tested but should be simpler to look at)

// gets percentage between -1.0 and 1.0 velocity -> 0.0 to 1.0
// -1 velocity -> 0.0
// 0 velocity -> 0.5
// 1 velocity -> 1.0
var t = Mathf.InverseLep(-1f, 1f, velocity.y);
// gets the angle at that percentage between -90 and 90
var angle = Mathf.Lerp(-90, 90, t);

var fromRotation = transform.rotation;
var toRotation = Quaternion.Euler(0, 0, angle);
// will suffer from rolling lerp.to speeds, but should be fine for a
// flappy bird visual tbh
transform.rotation = Quaternion.Lerp(fromRotation, toRotation, Time.deltaTime / duration);
ember tangle
ashen sonnet
rich adder
ember tangle
rich adder
#

i would start with the one that says about assigning position to that rigidbody .position @ember tangle

#

since you're trying to assign NaNs to it

#

what is AttackRange

ember tangle
#

Its a sphere collider trigger for ranged attacks and fire at will behaviour, but you're right it does have a rigidbody, ill disable it in the script when the formation enters a dead state and see if that is the issue

#

but I haven't destroyed any GameObjects so I don't know why it would be causing this

rich adder
safe radish
zenith cypress
#

Cellular Automata

rich adder
#

holy shit your batches shoot through the roof with that water though

safe radish
safe radish
rich adder
vale karma
#

im trying to place stuff on a cart but its not acting like any other object when being placed on it

rich adder
#

are you sure about that line

slender nymph
#

this is the wrong file

zenith cypress
#

That's the wrong script

rich adder
#

wait this wrong script

ember tangle
rich adder
#

send Handle

ember tangle
#

except im not dividing at all

#

!code

eternal falconBOT
rich adder
languid spire
ember tangle
#

they just change into a dead state

#

I guess they get removed from a list

#

maybe just wrapping everything in some type of foo != 0?

glad rune
#

i change the start color of this particle in the particle generator with the script. It does change the color but the particles dont spawn

#

what wrong

frank zodiac
#

is there a way to get the position of the edge of the screen in world space?

#

and store it in a Vector3

#

or Vector2

frank zodiac
rich adder
#

yeah but you have the "edges"

vast vessel
quick pollen
#

Is there a way to draw capsules using Gizmos?

rich adder
frank zodiac
#

ok thanks

quick pollen
#

I am having some issues with a capsulecast I have

#

and I have no way of even seeing what the capsulecast looks like

rich adder
#

as some screens can cut off that very edge

vast vessel
# vast vessel hey guys. why is the initial velocity, calculated by the `CalculateProjectileAng...

Projectile motion is a form of motion experienced by an object or particle (a projectile) that is projected in a gravitational field, such as from Earth's surface, and moves along a curved path under the action of gravity only. In the particular case of projectile motion on Earth, most calculations assume the effects of air resistance are passiv...

#

i just subtracter the init positions x and y from the target positions x and y, since the formula originally only worked for a projectile that starts at (0,0)

quick pollen
frank zodiac
# rich adder you might want to account for "safe area" https://docs.unity3d.com/ScriptReferen...
Camera cam = Camera.main;
Vector3 bottomLeft = cam.ScreenToWorldPoint(new Vector3(0, 0, cam.nearClipPlane));
Vector3 bottomRight = cam.ScreenToWorldPoint(new Vector3(Screen.width, 0, cam.nearClipPlane));
Vector3 topLeft = cam.ScreenToWorldPoint(new Vector3(0, Screen.height, cam.nearClipPlane));
Vector3 topRight = cam.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height, cam.nearClipPlane));

so can i use this?

#

this wouldnt work for UI though right

rich adder
frank zodiac
rich adder
ember tangle
# rich adder you're making the transform implode somehow lol
{
    float totalX = 0f;
    float totalY = 0f;
    float totalZ = 0f;
    foreach (var unit in units)
    {
        totalX += unit.transform.position.x;
        totalY += unit.transform.position.y;
        totalZ += unit.transform.position.z;
    }
    float centerX = totalX / units.Count;
    float centerY = totalY / units.Count;
    float centerZ = totalZ / units.Count;

    return new Vector3 (centerX, centerY + vOffset, centerZ);
} ```Turns out this function was trying to access an empty list, crazy how many unique errors that can cause...
#

now I live in fear of AABB errors

rich adder
#

which is a big nono in any calculator, that includes a computer lol

ember tangle
#

now it checks units.Count before its called. It all makes sense to me now

languid spire
ember tangle
#

hmm that is a good point

#

I assumed that at some level 3 floats were more lightweight than a Vector3.

languid spire
#

no, actually heavier to a minisucule amount

ember tangle
#

why is that?

polar acorn
# ember tangle why is that?

Because they might be stored in different places in memory and it's faster to read three values in a row instead of spreading around

languid spire
#

because 3 floats are 3 stack addresses whilst 1 Vector3 is 1 address + 3 ofsets

polar acorn
#

A Vector3 is all in one contiguous stream of memory

ember tangle
#

I learn so much from this discord lol

languid spire
#

more importantly, your code would look so much cleaner using a Vector3 rather than 3 floats

rich adder
#

tuple pikachuface

languid spire
#

why reinvent the wheel?

rich adder
#

true true. vector3 unity only no?

#

or Numerics ig

languid spire
#

not if you have your own library, no. I have every Unity class and struct remapped into POCO's

rich adder
#

I just remember Json.net threw a hissy fit for Unity's V3

#

something something self referencing loop

glad rune
#

i change the start color of this particle in the particle generator with the script. It does change the color but the particles dont
spawn for some reason, if the color isnt changed it spawns normaly

short hazel
# rich adder something something self referencing loop

Yeah without the custom serializer, it tries to serialize its normalized property, which is a vector, so it tries to serialize its normalized property, which is a vector, until it overruns it's internal serialization depth limit

rich adder
#

ahhhh the property normalized yeah I remember reading about that

#

i had to enable the option for json.net but was only a bandaid

#

unity cloudsave uses json.net it cannot be modified so i couldn't serialize anything with v3 via sdk sadly

rich adder
short hazel
#

It's a property IIRC, so it just skips over it lol

rich adder
#

in json.net I had to do ( only works on my local unity project save not unity cloud)

JsonConvert.SerializeObject(Poco, Formatting.Indented, 
new JsonSerializerSettings 
{ 
        ReferenceLoopHandling = ReferenceLoopHandling.Serialize
});```
#

maybe they have something like that by default? that would be horrid seems like its a bad thing here no

short hazel
#

Yeah that, or declare a custom JsonSerializer<Vector3> class (it comes bundled with the version Unity uses, or as an addon if you install it yourself) and add it to the settings

rich adder
frank zodiac
#

why doesnt Vector3 correctly translate to my image rect transform? its a little off

polar acorn
frank zodiac
rich adder
#

are you usin anchoredPos?

frank zodiac
#

but basically i have this vector3 and i want to instantiate an image in my world space overlay UI canvas in a random x position somewhere and when i put them its a ltitle off

frank zodiac
rich adder
#

if the image is UI rect transfrom inside the canvas try using anchoredPos

#

iirc transform.position doesn't account for scale of canvas so its off, I could be wrong there

timid hinge
#

hi guys anyone know why is this error showing?

rich adder
timid hinge
#

how?

rich adder
#

yeah button list doesn't match unlockedLevel , is out of range of whats available

rich adder
eternal falconBOT
#
Visual Studio Code guide

If your IDE is not underlining errors in red or autocompleting code,
please configure it using the link below:

https://on.unity.com/vscode

rich adder
#

follow this guide exactly

timid hinge
#

done

#

but is showing the same error

#

what i was supost to do is the first map is clickeble but the other dont

rich adder
#

configuring this wouldn't fix the error, it would fix your editor from being just a text editor

timid hinge
#

the vs

rich adder
#

the error you have is a runtime error , nothing to do with the fix

timid hinge
#

oh

rich adder
#

you should still not be coding in "Restricted mode" and without the Unity extension enabled

queen adder
rich adder
# timid hinge oh

the error to fix is simple keep the amount of unlockedlevel always less than buttons.length

#

sorry no other way around

frank zodiac
#

when i run a coroutine does it automatically wait for the coroutine to finish THEN continue to the next line?

frank zodiac
rich adder
frank zodiac
rich adder
#

the coroutine is part of the script

frank zodiac
#

the game

rich adder
#

Update?

quick pollen
#

can anyone tell me how to debug a CapsuleCast?

#

sorry for asking again but yeah

radiant frigate
#

!code

eternal falconBOT
rich adder
frank zodiac
rich adder
#

no dont screenshot code

frank zodiac
rich adder
frank zodiac
frank zodiac
rich adder
# frank zodiac but.. the colors
 private bool someResult = false;
 private void Update()
 {
     if (someResult == false) return;
     //other stuff waiting
 }
 private IEnumerator Operation()
 {
     yield return new WaitForSeconds(1);
     someResult = true;
 }```
#

colors work fine

#

but yea i see you're trying to do something else

frank zodiac
rich adder
#

codeblock and inline are different things

#

large classes use a website

frank zodiac
#

right?

rich adder
#

codeblock

radiant frigate
frank zodiac
radiant frigate
rich adder
rich adder
#
void Method(string something) //wow colors```
radiant frigate
#

srry for the confusion

frank zodiac
rich adder
radiant frigate
#

bookmark?

rich adder
#

no need to keep summoning bot

rich adder
radiant frigate
#

no clue

#

you mean like save the link somewhere or something like that ?

rich adder
#

my guy you want to gamedev you should know what a bookmark is

radiant frigate
#

no clue srry

rich adder
#

are you trolling ?

frank zodiac
#

for later use

radiant frigate
#

oh

frank zodiac
#

pretty sure thats what he means

radiant frigate
#

makes sense

frank zodiac
radiant frigate
#

yeah i should save the link somewhere

frank zodiac
#

use it

rich adder
frank zodiac
#

but i agree, it is pretty useful to know

#

just not, mandatory

rich adder
#

thats just sad

frank zodiac
#

i know them by rule of thumb

rich adder
#

this day and age someone who doesn't know a bookmark should have computer locked away

radiant frigate