#💻┃code-beginner

1 messages · Page 595 of 1

queen adder
#

i think i might've encountered an error:

wintry quarry
#

it's not set up properly for coding with Unity.

#

!ide

eternal falconBOT
wintry quarry
#

And yes the error is because you declared your prefab as a GameObject instead of as an EnemyMovement

queen adder
#

😭

#

not gonna lie, everything you're saying is like going above my head

#

so sryy but can someone lime walk me through step by step if you can

rich adder
swift crag
wintry quarry
#

follow the link above

#

We aren't supposed to help you until you do that

queen adder
#

alright

#

bet

rich adder
#

this will help you out

crude plinth
#

!vs

eternal falconBOT
#
Visual Studio guide

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

Visual Studio (Installed via Unity Hub)
Visual Studio (Installed manually)

rancid tinsel
#

guys im so lost - I can't get WebGL to grab text files from a folder with 3 different methods so far. 1. Just normally grabbing it from StreamingAssets doesn't work. 2. Grabbing it from Resources folder doesn't work. 3. Using UnityWebService to grab it also doesn't work, tells me accessing the folder is forbidden or something:

#

Any idea how to get around this? I know I can also set stuff in the inspector as TextAssets, but that is unreliable

rich adder
rancid tinsel
rich adder
#

ohh alright

rancid tinsel
#

Also the occasional missing reference from messing with scenes and stuff

rich adder
#

you're using UnityWebRequest just makes a get request yes?

rich adder
#

show code

rancid tinsel
#

Application.streamingAssetsPath + "/WordLists"

rich adder
grand snow
rancid tinsel
wintry quarry
#

you can use Resources with WebGL...

rich adder
rancid tinsel
void dawn
grand snow
#

At this point try resources again correctly or have a serialized asset list for text assets

polar acorn
wintry quarry
void dawn
polar acorn
void dawn
rich adder
polar acorn
queen adder
#

but just cannot find the preferences tab

#

its like missing on my end

rich adder
rich adder
#

are you on mac or pc

queen adder
rich adder
#

oh no its in Unity

queen adder
#

oh

#

sorry my dumbahh

#

thanks for clarifying that

rich adder
#

mac is under Unity, on Win under Edit

void dawn
polar acorn
# void dawn it didnt work

As in nothing logged? If so, either nothing has this script on it, or everything with this script on it has no rigidbody

#

If it's the latter, you should be seeing the log you already put in place that would tell you that

#

Obviously, you would have checked the logs you intentionally added before asking the question, though

void dawn
#

maybe i gotta change something in the inspector , any ideas ?

polar acorn
#

Well, do you get your log saying that there is no rigidbody on the bullet?

swift crag
rancid tinsel
swift crag
void dawn
swift crag
#

You also have to do that if they're copied into a StreamingAssets folder

rancid tinsel
#

ig its stretching it a bit tbh

swift crag
#

If the word lists must be fetched at runtime, I would completely keep them out of your project

#

Just host them separately

polar acorn
swift crag
#

which is generally a bad idea

void dawn
#

wait a sec

polar acorn
polar acorn
void dawn
#

the bullets do spawn they just dont move

polar acorn
#

Do you get any logs

rich adder
void dawn
polar acorn
rich adder
swift crag
#

Ensure that you do not have information messages hidden.

rich adder
#

screenshot console window in playmode

swift crag
#

These buttons in the console should be light gray, not dark gray

#

e.g., this is wrong

void dawn
#

all i get is this

Bullet Velocity: (0.00, 0.00, 0.00)
UnityEngine.Debug:Log (object)
Bullet:Start () (at Assets/scripts/Bullet.cs:42)

polar acorn
#

Why did you say it didn't print

rich adder
#

oof

polar acorn
#

Your velocity is 0, that's your problem

void dawn
#

sorry im new to unity

polar acorn
#

You have no speed

swift crag
#

if you don't know what something means, you need to ask about it, instead of trying to skip past it

polar acorn
#

When you multiply something by 0, it becomes 0

void dawn
#

so i gotta fix the code got it

queen adder
rich adder
queen adder
#

oh its not 2.0

#

or is it fine

#

alright

#

done

rich adder
#

screenshot entire VSC window

queen adder
rich adder
#

ok there is an error

rich adder
# queen adder

You need to download .NET Sdk, install it and restart pc

queen adder
#

being downloaded right now

rich adder
grand snow
queen adder
#

k bet

rich adder
#

its just .NET SDK missing

#

more specifically dotnet command

swift crag
#

VSCode is supposed to automatically fetch .NET for you

#

it just...sometimes doesn't

rich adder
#

supposed* to fails 9/10

lime cosmos
#

Hey guys, does anyone know how to work with Mesh Colliders? I need it for a school project.

swift crag
#

do you have a question?

rich adder
queen adder
rich adder
#

now it tell you what the issue is in editor and also show all the classes you made, should be simple fix

queen adder
#

yes make a new class

#

for enemymovementprefab

rich adder
#

nooo

queen adder
#

or

#

change it to GameObject

rich adder
#

other way around

polar acorn
#

Does your enemy prefab already have a script on it that contains the data you want?

queen adder
#

thats what it fixed to

rich adder
#

why did you change it back to GameObject

polar acorn
rich adder
#

the prefab was declared as GameObject when you wanted it to spawn as EnemyMovement

queen adder
#

i think my enemyMovement has a player feature

rich adder
#

oh boy..

#

hint : you changed it backwards

polar acorn
#

not GameObject

#

not enemyMovementPrefab

#

but this

#

That is the type you want your prefab to be, and that is the type you want to store the result in

swift crag
#
public Foo bar;

This declares a field named "bar". The field can contain a Foo. Anyone can see the field because it is public.

queen adder
#

thats a different file tho, enemyMovement.cs is for the AI navigation and EnemySpawner.cs has the spawning feature

#

should i put it all in one file so that its not confusing

swift crag
#

No.

swift crag
#

You cannot put multiple MonoBehaviour classes in the same file.

#

It's also irrelevant, yes

polar acorn
#

You have the type

#

Use that instead of game object

#

that's it

rich adder
#

let me give you a teaspoon
EnemyMovement enemyPrefab;

EnemyMovement newEnemy = Instantiate(

queen adder
#

yea i was just about to send screenshot

#

ok

rich adder
#

most of the time get GameObjectout of your habits

swift crag
#

You can refer to a prefab as a GameObject or as any component type attached to its root object

queen adder
#

i changed it to movement

swift crag
polar acorn
#

!learn

eternal falconBOT
#

:teacher: Unity Learn ↗

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

swift crag
#

EnemySpawner is the name of a type.

fickle plume
#

Should take tutorial session to a thread

polar acorn
#

Change the type of the variable

queen adder
#

yes i changed it to EnemyMovement

polar acorn
#

if you don't know what that means, hit the basics

queen adder
#

that screenshot is old

#

lol sorry guys

rich adder
#

start with the pathways tbh it will go over this stuff

swift crag
rich adder
#

you're trying ride a bike downhill without ever having training wheels

queen adder
#

yea.....

#

honestly, same thing happened with me last year in gamemaker......

swift crag
#

it's very hard for us to help you if you don't know what any of these things actually mean

queen adder
#

the instructure just gave us to do the roll a ball, didnt teach us anything beforehand

rich adder
queen adder
#

alright i'll try that

errant shore
#

Does someone know how to use "decimal" ? Because someone said it rounds the numbers

errant shore
#

ok but do you know what makes my number smaller

polar acorn
#

decimal is just a larger variable type than double so it can store more values

wintry quarry
errant shore
#

that can be, I watched a 3 year old tutorial

errant shore
wintry quarry
errant shore
#

yes

#

look the code

polar acorn
wintry quarry
#

You have to remember we don't know what you're working on or what's going on. You need to explain

ivory bobcat
errant shore
#

yes

errant shore
#

no wait

#

its big mistake

ivory bobcat
#

Is this Unity related btw?

wintry quarry
errant shore
wintry quarry
#

So all these numbers with hundredths of a euro are slightly off

#

If you want accuracy with money etc you should use integer types

#

e.g. store long eurocents and do all your math with that, then format it as euros later.

ivory bobcat
#

!csds

eternal falconBOT
last radish
#

Does anyone have a comprehensive tutorial on how to implement wave function collapse for complete beginners? i am trying to create a procudral backrooms map on a small plane, and i heard this is the way to do it.

rich adder
#

ill try find it

swift crag
#

whoops

#

My first implementation was not really based on a tutorial, though

last radish
#

yeah but problem is im a complete beginner in unity

swift crag
#

You should start with something that is deliberately not optimal

#

no bit-fields, no clever tricks

#

Imagine something like this

#
public class WFCSlot {
  public List<WFCTile> legalTiles;
}

public class WFCTile {
  public List<WFCTile> legalNeighbors;
}

public class WFCGenerator {
  WFCSlot[,] cells;
}
#

Each slot holds a list of legal tiles

#

When you place a tile, you throw out anything from neighboring cells' legalTiles that isn't in that tile's legalNeighbors list

verbal dome
swift crag
#

Yes -- it didn't learn from an example

#

I figured that would be way more annoying to implement

verbal dome
#

Ive been thinking of experimenting with non-tiled WFC

swift crag
#

each tile had a set of adjacency rules (including rotations)

last radish
#

yeah i kind of understand how it works fundamentally, but i have absolutely no clue on how to implement/code it. tbf i wouldnt mind just copying someones code as this is for a school project and theres about a trillion different things i need to do

verbal dome
#

Didnt get to implementing it yet, because it does sound annoying

#

But probably pretty rewarding when it clicks

swift crag
#

it's pretty expensive (a 3x3 window is way slower than a 2x2 window)

#

I do want to try it out eventually

verbal dome
void dawn
#

So I'm Trying to make this model I made do some animations I got from mixamo, but said model isn't doing any animations like it did on the website and not following any code

whole flower
#

Hi, I'm not sure if this is this is considered beginner or advanced, so if my question is not fit for this channel tell me and I'll move it to the right one
I want to optimize performance by replacing a coroutine (IEnumerator) to an async routine (Awaitable), but my IEnumerator coroutine uses a WaitUntil, and I don't know how it would translate in an Awaitable

chrome apex
#

What am I doing wrong? I moved a static bool to public and refactored the scripts to reference it but it doesn't work

#

I just get a million null reference exceptions

polar acorn
eternal falconBOT
polar acorn
#

And what line has the error

rich adder
chrome apex
#

wait, do I need to reference the game object AND the class?

#

if so, that's stupid

polar acorn
#

We can't really answer that

rich adder
#

static variables belong to the class itself not other objects from that class

polar acorn
#

unless you actually say what you're doing

chrome apex
#

ok I'll show the simplest script

rich adder
#

& share the null reference error screenshot

chrome apex
#
public class Follow : MonoBehaviour
{
    public GameObject Ball;
    Vector3 ballPosition;
    public Play Play;
    public GameObject PlayButton;
    // Start is called once before the first execution of Update after the MonoBehaviour is created
    void Start()
    {
        
    }

    // Update is called once per frame
    void LateUpdate()
    {
        if (Play.play)
        {
            ballPosition = Ball.transform.position;
            transform.position = ballPosition;
        }
    }
}
#

do I need the game object reference here or no

polar acorn
chrome apex
#

for accessing a bool in the Play class

rich adder
#

its static, it belongs to the class you don't need to make a field for the class

polar acorn
#

Is play static?

chrome apex
#

it's not static. I removed it from static

rich adder
#

this pattern is also pretty bad

chrome apex
#

so I could make it just public

polar acorn
chrome apex
#

ah ok

#

I mean, that's weird, cause I reference the class and drag the game object with the script

#

then I also need the object reference

#

seems redundant but ok

frosty hound
#

That's incorrect

#

Your GameObject is the reference.

chrome apex
#

ok then I don't need the reference

#

but I get a null reference exception

rich adder
#

yes for the component

polar acorn
#

You do.

#

You need a reference to the Play object you want to use

rich adder
#

it needs to know WHICH component on which object

polar acorn
#

And you get that by dragging in the object

rich adder
#

since components need gameobject you always need to put it on a gameobject

frosty hound
#

If you're getting an NRE, check your scene for other Follow components (in the search bar) and make sure they all have something assigned to Play.

chrome apex
polar acorn
#

Boom, now you have a reference

chrome apex
#

yea I did

rich adder
#

same with ball

chrome apex
#

null reference exception

#

all of the scripts have the reference

frosty hound
polar acorn
rich adder
chrome apex
#

ok sec

#

the line was at if (Play.play) I believe

#

I'll recheck

rich adder
#

so if you put Ball in there (the field by drag and drop ) what makes you think Play is any different, just drag and drop object there

#

you generally dont want a field just as GameObject
you want it as whatever script/component on the object so you can start doing things with it right away instead of looking for component each time

rocky canyon
#

Debug.Log($"Play is: {Play}";

chrome apex
#

OK now I only got the null reference exception on 1 object that is referencing

#

I restarted

#

and I got 0 errors

#

coolio

#

I didn't do anything literally

polar acorn
#

You probably didn't clear the error after you fixed it

chrome apex
#

yea but why did I originally get an error every frame, but then stopped getting it without doing anything at all

#

fkn unity

#

maybe the restart fixed it

rich adder
frosty hound
#

That's not possible. Either you didn't save, or you didn't wait for the recompile, or you didn't clear the error.

rich adder
#

once you made non static thats when it probably went NRE

chrome apex
polar acorn
chrome apex
#

I mean I could do that anyway but ok, I wanted it "clean" whatever that means

rich adder
polar acorn
rich adder
#

static variables belong to the class itself so they dont need instance reference

chrome apex
chrome apex
#

I commented out all the lines referencing it until I put in the necessary references

#

but ok whatever it works now

#

I was frustrated because I thought I didn't know something but I did lol

rich adder
#

unity has its quirks too

swift crag
#

this is entirely a behavior of C# , though

rocky canyon
#

if i had a nickel for everytime someone blamed the Unity Editor.. I'd be Scrooge McDuck 🦆

swift crag
#

(and it's very normal)

rich adder
#

the drag and drop part

rich adder
rocky canyon
#

^ facts.. keep things private until you need them not

rich adder
#

I tell myself before i start drinking...

rocky canyon
#

lmao.. over-sharer eh?

rich adder
#

hank hill showing his buttox in the elevator good episode..

jovial sable
#

how do i get over a breakup in c#

polar acorn
jovial sable
#

yes sir

void dawn
#

So I'm Trying to make this model I made do some animations I got from mixamo, but said model isn't doing any animations like it did on the website and not following any code

rocky canyon
#

make sure your rig is compatible

#

and its rigged correctly..
check the animator to see if the clips are actually playing (during run-time) first

celest flax
#

I've made a seesaw that I want the player to be able to use by standing on it, but the player uses a character controller and the seesaw works with a rigidbody. Is it possible to make them work together or will I have to change my player, since it doesn't really use physics?

polar acorn
rocky canyon
#

good luck 🍀

summer thorn
#

What's the equivalent of lua's local/global variables in c? I thought it was private/public but those seem to constrict access to class/across classes respectively, and are both evaluated at runtime which is not the behavior I want. I want a function-scoped variable that is initialized when reached, and script-scoped variable that is initialized when reached.

#

Also, stackoverflow says variables are tagged "private" by default, but I don't believe so.

Declaring variable with private gave me image 1's error: A field initializer cannot reference the non-static field, method, or property 'PlayerCamera.SensitivityX'

Removing the private cleared it up

polar acorn
#

Whether they are inside or outside a method

summer thorn
polar acorn
summer thorn
polar acorn
#

No idea

slender nymph
summer thorn
#

Then there can't be another separate variable in a more refined scope?

polar acorn
#

I refuse to use 1-indexed languages on principle

summer thorn
polar acorn
#

You could reference the field variable with this.

summer thorn
summer thorn
slender nymph
swift crag
#

whilst a field, declared directly inside of the class, is part of each instance of the class

polar marsh
#

How do i parse data from json? I've got a response from an api that looks something like this {"playerName":"ben"}, but i cant figure out how to separate this out so i can get the player name by itsef

swift crag
#

For simpler applications, you can use JsonUtility.

slender nymph
#

use jsonutility (if simple data that it supports) or json.net

swift crag
#

Whether you use JsonUtility or opt for Json.NET, you'll need to create a class that matches the shape of your data

ripe shard
polar marsh
slender nymph
#

if you're already serializing it in your c# code, then use the exact same thing to deserialize it

polar marsh
#

That's the thing, i'm not

#

It's the api doing it and im not sure what it does

slender nymph
#

then wtf did you mean by "I already have a class that i use to serialize the data earlier"

void dawn
#

can someone please help me with me ? im trying to make this enemy right ? but the code wont do shit , he wont play any animations , my enemy just says put , i dont think it has something to do with the code

i got a warning saying " Failed to create agent because there is no valid NavMesh"

can someone please help ?

ripe shard
polar marsh
polar acorn
#

If you want to use a NavMeshAgent it needs to be on a NavMesh

polar marsh
void dawn
#

i also got a error saying

MissingComponentException: There is no 'AudioSource' attached to the "ZOMBIE" game object, but a script is trying to access it.
You probably need to add a AudioSource to the game object "ZOMBIE". Or your script needs to check if the component is attached before using it

but i did add a audio source , and that means the script works and that is detecting the player , but something wont let him do what he is supposed to do

polar acorn
swift crag
wintry quarry
swift crag
#

Ooh, I see

#

It gives you back plain json

#

...actually, what does it give you back?

polar marsh
#

Yeah it is just plain json

swift crag
#

ah, yep, a string

#

You can use JsonConverter to deserialize it.

#

JsonConverter is built into Unity. JsonConvert is from the Json.NET package.

void dawn
#

fixed the audio part , but got a new error saying "SetDestination" can only be called on an active agent that has been placed on a NavMesh."

polar marsh
swift crag
#

you can probably just use this

polar marsh
#

Im guessing thats what they do inside the leaderboard method

swift crag
#
JsonUtility.FromJson<TheTypeYouWant>(jsonData);
#

e.g.

ripe shard
#

You should not use JsonUtility for dealing with web APIs

#

json utility is a minimalistic serializer that has zero convenience

swift crag
polar marsh
#

Yeah ill use that then ty

swift crag
#

(and in that case, it should already be available in the project)

polar marsh
#

Yes it is i didnt realise it wasnt in the standard library

ripe shard
#

a lot of unity packages install/use it as a dependency

polar acorn
polar marsh
#

Sound, that seemed to work ty

polar acorn
void dawn
#

so my navmesh inst active ? here is a screenshot of my navmesh in inspector

wintry quarry
polar acorn
#

Also, this screenshot does not show anything about a NavMesh

swift crag
#

(in fact, a nav mesh can't be "active")

primal aurora
#

click on bake on the NaveMesh

swift crag
#

disabling a NavMesh Surface component causes its navmesh to go away

ember tangle
swift crag
#

a NavMesh Surface component is used to bake the navigation mesh

#

one must be presesnt (and have been baked)

#

or else there is no data for the NavMesh Agent to use

primal aurora
#
Unity Learn

NavMesh Components make up the navigation system in Unity. The navigation system allows users to create characters that can intelligently move around the game world, using navigation meshes that are created automatically from your Scene geometry. Dynamic obstacles allow users to alter the navigation of the characters at runtime, while off-mesh l...

eternal falconBOT
#

:teacher: Unity Learn ↗

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

swift crag
#

This tutorial is out of date.

#

It's for older versions of Unity that don't have the AI Navigation package

#

and thus don't have things like the NavMesh Surface component

void dawn
#

i was able to bake it , but i think the enemy is falling of the floor or something , he wont appear when i test it

polar acorn
#

Where do they end up? Look in scene veiw and see what's happening

swift crag
#

you can select the object and hit "F" to focus on it in the scene view

#

I remember having a fun time with this during a game jam. We were spawning enemies at...interesting positions

#

sometimes they just exited the map

#

bye-bye

void dawn
#

i saw him flying of the map , i guess i gotta add a rigbody add gravity and then it will work

#

ok i just tried that and now he flies up moves abit and then goes down , i have no idea whats going on now and no idea how to fix it

#

no errors appear

polar acorn
#

Gravity does make things fall. If it's going through the ground, does the ground have a collider?

void dawn
polar acorn
#

You might need to capture a video of what you're seeing, or post !code

eternal falconBOT
rocky canyon
#

theres navmesh gizmo's when u have an agent selected that might be some use

mystic lark
#

i reallly dont know whats the problem here i have these animations for a bow i made and everything works great untill i shoot the bow to explain(i made it o when i release the PlayerAimShoot(rightclick) the bow will return to idle pose and it works when i relase it goes back every time but when i shoot the bow now goes back on its own every time i try to aim in the middle of the animation even tho im still presing the rightclick so it souldnt be possible right idk someone tell me what am doing wrong. i can send a video of it happening if needed.

hot laurel
#

u definitly should post here that video and also share code of PlayerAimShoot

#

and PlayerShoot

rocky canyon
#

imo it'd be a nicer setup with
a bool isAiming and a single trigger called Fire or something

#

could make a more tidy animator.. and have the states do their thing..
it'd be more automatic than controlling every aspect of it w/ triggers..
TLDR: too many triggers for my liking..

hot laurel
#

i would just Play those animations instead of maintain so much of triggers

wintry quarry
#

you'd use one trigger and then let the state machine do the rest of the transitions

rocky canyon
#

^ having multiple triggers and laying it out the way u do.. imo is asking for trouble

mystic lark
wintry quarry
#

well maybe one trigger to draw, another to release

rocky canyon
#

i think a bool would be better for drawing..

#

that way u could release and have it transition back to idle.. w/o having to worry about resetting the trigger or anything

wintry quarry
#

yeah it would handle the draw but then undraw without shooting the arrrow case well

mystic lark
rocky canyon
#

u could do the same w/ both animators

#

if u use the same naming convention u could even loop thru them w/ a single line of code

#

forgive my crap mspaint skills

mystic lark
mystic lark
# rocky canyon

but also my fire animation is made to go back to the idle position so is the trasition from fire to idle needed?

primal aurora
rocky canyon
#

it'll follow the transition.. just less work i was thinkin

mystic lark
#

thanks sm

rocky canyon
#

would be helpful to see in realtime what ur nav agent is trying to do

void dawn
polar acorn
eternal falconBOT
polar acorn
#

Can you show the inspector of the Zombie object?

#

It looks like either you have an animation with root motion, or it has a parent and child that both have a rigidbody

void dawn
polar acorn
# void dawn

Remove the Animation component. It's unrelated but you shouldn't be using it, you already have an Animator

#

Does this object have any children? Do any of the child objects have Rigidbodies?

void dawn
polar acorn
#

Can you show a screenshot of this object on the NavMesh? With the collider gizmo visible?

void dawn
#

like this

polar acorn
#

It should probably be on the ground, instead of in the ground

#

Also, you might want to re-bake the mesh because it looks like that collider actually stopped that ground from being considered "Walkable"

void dawn
#

i rebaked it , good news it stoped flying away , now it justs disapears before i can see it

polar acorn
#

While playing, switch back to scene view, select it in the hierarchy, and press F

void dawn
polar acorn
#

Does your floor have a collider

swift crag
#

a NavMesh Agent does not depend on colliders -- it just snaps to the mesh

#

However, the Animator could be controlling the position of the object

#

which would cause everything to go haywire

polar acorn
#

But this also has a rigidbody on it, so maybe getting rid of that is the play

#

or at least disabling gravity

swift crag
#

oh, yes, that's going to make it fall straight down

void dawn
#

yes , the player can walk in it

#

so it works for the player

swift crag
#

I would suggest setting up your character like this:

  • Character <-- NavMesh Agent
    • Model <-- Animator
#

the Animator can do whatever it wants with the model object

void dawn
#

so the animations should only be on the model not the character ?

midnight compass
#

Where can I learn simple fps movements?

void dawn
#

is there something wrong with the model ? i tried everything but he always just falls to the floor , i even added a capsule colider

swift crag
#

The model doesn't matter at all.

#

turn off the Animator and remove the Rigidbody completely. The object should stick to the NavMesh.

void dawn
swift crag
#

Deactivate every child object so that there is nothing but the "ZOMBIE" root object. Also turn off your "Zombie AI" script.

fading marten
#

Hey I'm trying to put in a background but the camera just doesn't see it. Can someone help?

swift crag
#

how are you trying to do this?

fading marten
#

I put the image into the game as an object then it into a background layer which I then put above the default layer

swift crag
#

"as an object"?

#

Show me exactly what you did

#

i'll need to see screenshots of the inspector for the background object

fading marten
swift crag
#

Turn off 2D mode and the problem should become apparent

#

if it's not obvious after doing that -- compare the Z position of the camera and the background

fading marten
#

Ah I see thanks

swift crag
#

Sorting layers will only matter if two sprite renderers are at the same depth from the camera, btw

void dawn
swift crag
#

the navmesh surface is not supposed to be attached to the character

#

attach it to an empty object

#

ideally, I'd parent the rest of the level to that object, then set the surface to only look at things in its current object hierarchy

polar acorn
void dawn
#

i turned off everything beside the model and now it just stays put in air , obviously

void dawn
swift crag
#

you've glued the entire world to the zombie

polar acorn
#

What does making the zombie a walkable surface have to do with finding anything?

void dawn
#

dang

#

i guess i should take off

humble marsh
#

im so confused by what bound.min and bound.max are even for on box colliders in code. I need the closest value to the world origin and the largest value away from the world origin, which thats what i thought the bounds.min and max were, but they arent even close, just giving max and min y ig? the x and z values arent at the corners like i thought, and i have to use center - size/2 and center + size/2. What are they used for, i mean why have that value exposed?

teal viper
humble marsh
#

im saying you cant use it for that bc they dont do the minimum x and z, and max x and z

teal viper
#

Who says what?

humble marsh
#

wait, no matter how i do it i cant actually get the bounds

teal viper
#

Sounds like a different problem then

humble marsh
#

the max and min both return positive, even when doing 1 - 2

#

ahhh absolute values, rip me ignore me i know what the problem is, completely didnt think of it

teal viper
#

Should also note that collider(maybe other too) bounds are in world space, so there's nothing wrong with both min and max being positive.

humble marsh
#

yes, but i need the one collider encompassed completely in all axis by the bigger collider

#

so i need to check that its bigger xyz then the min bounds, but lower xyz then the max bound

echo tartan
#

I have this in Update()

int distance = target - current;
float current = Mathf.MoveTowards(current, target, distance * Time.deltaTime);

How do I calculate the time required for current to reach target? Does it depend on distance or is it a constant?

wintry quarry
#

therefore:
time = distance / rate

#

although your code is using the distance AS the rate

#

which is weird

#

and it means it will NEVER actually reach the target

#

I would expect the code to look more like:

int distance = target - current;
float current = Mathf.MoveTowards(current, target, speed * Time.deltaTime);```
#

also you should most likely be doing Mathf.Abs to the distance to get the absolute value.

humble marsh
#

So Today i learned that vectors are indexable

#

thats helpful

slender nymph
#

but why would you want to do that

humble marsh
#

to check if any is negative

#

if theres a better way to check if any value of a vector3 is negative, please let me know

slender nymph
#

i don't even know the purpose of doing that 🤷‍♂️

humble marsh
#

to check if something is inside of a set of bound coords

slender nymph
#

just create a bounds and use the Contains method

pure drift
#

!code

eternal falconBOT
humble marsh
#

ah, contains method. i legit read that 1h ago and just, forgot it existed when setting up my code

#

thats on me entirely

pure drift
#

https://paste.ofcode.org/QuddHhycTFugrTDgtk5v3h does anybody know if im doing this correctly im trying to have a mainclass that has a soundmanager right now and i want it to work like this basically MainController.Instance.SoundManager.<any public functions>; basically like a singleton that can be accessed anywhere

slender nymph
#

this is super cursed. why does MainController access SoundManager to do things when SoundManager inherits from MainController?

pure drift
#

idk i was trying inheritance but i guess i screwed up

slender nymph
#

also for future reference, you can use more than one link to share more than one class instead of shoving it all into one link so that it's harder to navigate between the two classes. or you can use paste.mod.gg which supports more than one file per link

pure drift
slender nymph
#

I would suggest looking up how to properly implement the singleton pattern then not have SoundManager inherit from MainController if MainController is going to be using SoundController

#

although this whole interplay between these singletons really feels like it's going to lead to a horrible web of singleton abuse

pure drift
frigid sequoia
#

Shouldn't the script on assets allow to modify the default superclass parameters?

frigid sequoia
#

What do you mean?

rich adder
#

Oh I thought you were asking why it wouldnt let you modify

frigid sequoia
#

Yeah, I mean why the parameters of the superclass are not showing there

#

They show once assigned as a component

west radish
#

I've been wondering this also

late burrow
#

why cant i add such function to button

    public void setmode(int mode)
    {
        usemode = mode;
    }```
#

i clearly see other functions from list having parameters

rich adder
late burrow
#

yes

#

nvm it displays now

rich adder
#

are you looking under the dynamic

#

oh ok

spiral lava
#

If i want to move i cant move

rich adder
#

!code

eternal falconBOT
rich adder
spiral lava
#

what i have to do

#

i dont understand

rich adder
spiral lava
#

ok

#

sorry

rich adder
#

no worries

#

your error seems unrelated to your code

rich adder
#

!vscode

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

spiral lava
#

hey

#

how i can do this

#

i dont understand all this

rich adder
#

you have to be specific

#

if you are confused about something, ask

spiral lava
#

can you say me what i have to do now

#

we can go in talk if you want

rich adder
#
  1. configure your IDE (code editor) vscode because its required to get help here
  2. Screenshot the error properly because it seems unrelated to code you posted
spiral lava
#

i make

#

a sreen shot then its not in my explorer

rich adder
spiral lava
#

yes

rich adder
#

it should be in your sidebar

#

and Ctrl V in discord

#

i mean you could also SS sections cropped too but good enough

#

error seems related to Version Control

spiral lava
rich adder
#

if you aren't using it just remove it in package manager

#

before you do screenshot it , wanna see something

spiral lava
#

here is 1 ss

#

srry

rich adder
#

screenshot is fine lol

spiral lava
#

ok waht i have to to now

rich adder
#

go to Window -> Package manager. Look in Project-> Version Control*

#

screenshot it

spiral lava
#

only this there

rich adder
#

no.. in Unity

#

idk how you even got to that

spiral lava
#

ok i send

rich adder
#

idk restart unity or just remove this package if restart doesnt help

spiral lava
#

can you help me to reinstall

frigid sequoia
#

Okay, what does that even mean? I never got that exception

#

Am I using this wrong?

spiral lava
rich adder
spiral lava
#

ok wait

rich adder
#

if you want version control use git

spiral lava
#

i have remove what now

spiral lava
#

yes i have

#

i have remove it

#

what i have to do now

rich adder
#

clear console

spiral lava
#

what console#

rich adder
#

the thing that says Console on it

spiral lava
#

where is console

#

ah i have

#

but there is nothing in

#

i cant move

#

i cant move my char

rich adder
spiral lava
#

this error is gone

rich adder
#

and show where you put script in the scene

spiral lava
#

here

rich adder
#

thats why i sent the link

spiral lava
#

taht

#

bro there is 6 liks

rich adder
#

so use any of them ?

eternal falconBOT
#
Using version control in Unity

Unity Version Control

git Git

Get the latest .gitignore file from here. It should be placed at the root of your Unity project directory.

spiral lava
#

and what script i have to send

#

can you say me what i have to do pls again

rich adder
#

use one of the links, copy and paste code there, save and send link

spiral lava
#

ok

#

using UnityEngine;

public class Movement : MonoBehaviour
{
// Bewegungsgeschwindigkeit
public float moveSpeed = 5f;

// Update wird einmal pro Frame aufgerufen
void Update()
{
    // Holen der Eingabewerte (WASD oder Pfeiltasten)
    float moveX = Input.GetAxis("Horizontal"); // A/D oder Pfeiltasten links/rechts
    float moveY = Input.GetAxis("Vertical");   // W/S oder Pfeiltasten hoch/runter

    // Berechnung der Bewegung basierend auf der Eingabe
    Vector3 movement = new Vector3(moveX, 0, moveY) * moveSpeed * Time.deltaTime;

    // Anwendung der Bewegung auf das GameObject
    transform.Translate(movement);
}

}

#

here

rich adder
#

are you fr ?

spiral lava
#

what

rich adder
#

I told you to use link

#

from the site

spiral lava
#

yes i have

rich adder
#

alright goodluck with this bs

spiral lava
#

Assets/Scripts/Movement.cs

spiral lava
#

what

#

nav can you say me what i have to do?

rich adder
#

mate ur frustrating to help , I told you what to do a few times already you managed to somehow make it worse each time

#

scroll up you will see

spiral lava
rich adder
#

also sending a screeenshot of the page after telling you this is like giving me a big "F you"

rich adder
#

this is gonna be all night with this , got no energy to explain the basics of the editor
hint : components need to be on gameobjects to do something in playmode.

polar acorn
eternal falconBOT
spiral lava
#

how i can see my unity version?

polar acorn
spiral lava
#

ty

ripe ermine
#

Hello im new here

rich adder
#

Hi new here

ripe ermine
rich adder
polar acorn
#

Then you should !ask it

eternal falconBOT
rich adder
ripe ermine
#

It’s about me , i mean i was making games 3 years ago and i got my certification for game dev but since that i stopped doing coding u can say i stopped doing this but now i want to start again , I don’t know where to start again

#

Any suggestions

#

!!

celest jackal
#

Hi all, new to unity. Im trying to make a script that changes a sprite to another sprite when it collides with a certain object but have no idea how.

rich adder
celest jackal
#

i scoured everywhere but it seems like there are only tutorials for SWITCHING places on collision

rich adder
frosty hound
#

That's half the work, detecting when something collides.

celest jackal
frosty hound
#

So your question really is, how do you change the sprite at runtime, which you just get the SpriteRenderer component, and change the sprite property on it.

celest jackal
#

im terribly sorry but i legit have no idea how to comprehend any of these

rich adder
#

also the docs shows example for each thing you need

spiral lava
#

how i can learn here?

rich adder
#

i can't read german

spiral lava
#

i have look all vid

#

i cant walk this is the code can any 1 help me?

tidal thorn
#

Been following this tutorial and this is supposed to show a "press to interact" UI then remove it, still very much so learning so I'm not sure what I'm doing wrong

eternal falconBOT
tidal thorn
#

That did it, thank you!

tidal thorn
rich adder
tidal thorn
#

Oh! Awesome, thank you!

rich adder
# tidal thorn That did it, thank you!

btw do you know this worked because difference between
function() function call that returns a result, your case void
function is a delegate , a reference to the method basically

tidal thorn
#

I did not know that

stark burrow
#

Can you call charactercontroller. Move multiple times in update loop

rich adder
#

try to combine all your velocity and dir into 1 call

#

multiple calls can give unexpected result

stark burrow
#

Okay thanks

#

One issue with using just one move call is that if I am near ledge to a declining slope and put a lot of forward velocity it flies off instead of sticking to a slope. How would I go about solving this?

brittle linden
#

so my character is falling through the plane and its driving me nuts! heres the script for player movement if anyone can help me fix my code if thats even the problem. another thing is my character crouches really slowly but thats not 1st priority for fixing it rn.

void thicket
#

!code

eternal falconBOT
void thicket
#

From your code your moveDirection.y never resets and only accumulates

stark burrow
tidal thorn
#

Similar to before, I'm following this tutorial and this script is meant to start the cutscene, but it's not letting me add the script to an object and says "script class cannot be found"

brittle linden
#

what does this error mean when im opening my project?

slender nymph
eternal falconBOT
tidal thorn
#

I downloaded the manual one, but it's not showing up in the preference tab's dropdown menu

slender nymph
# brittle linden what does this error mean when im opening my project?

that means there are compilation errors in the project. if the compilation errors are in your own code then it's typically safe to just ignore it and then fix the errors when the project loads. if you are unsure where the errors are from go ahead and enter safe mode so the editor doesn't break and you'll be able to see what the errors are so you can address them.

slender nymph
tidal thorn
#

I downloaded the one with "installed manually" next to it, then went to use it and Unity wouldn't recognize it

#

Just restarted the program and it's running now

slender nymph
#

so you went and installed visual studio? because your screenshot showed vs code which is an entirely separate program

tidal thorn
#

I have visual studio now, yeah

brittle linden
#

ik your helping someone else rn but i have no idea what this error means 😅

slender nymph
slender nymph
void thicket
tidal thorn
#

I set the preferences to that now that it's working, but clicking on my script is just opening the program and not the script itself

slender nymph
#

that isn't the only step to configuring visual studio

brittle linden
tidal thorn
#

Tried opening a script now and the program just says "This operation could not be completed"

slender nymph
#

make sure you have completed all of the configuration steps, then if the issue persists try restarting everything (including pc if necessary)

tidal thorn
#

What other configuration steps are there? The link in the !ide thing sent to me a page, I followed everything it said on there across a few pages, and It's not changing

eternal falconBOT
slender nymph
#

wdym "across a few pages"? the configuration steps are on one page.

#

and if you have completed the steps, then i've already told you what to try next

brittle linden
#

ok so it was the easiest fix ever except for one thing, my player is slowly falling through the floor still, even though i thought i fixed it

slender nymph
#

make sure both objects have colliders and that you are moving the player in a physics friendly way

brittle linden
#

ok well the video is very laggy lol but you get the point

slender nymph
#

i mean, i really don't considering nothing of value is being shown in the video

brittle linden
#

im slowly falling through the gound and i already checked if they have colliders, plus i am just walking on a plane object so im not walking non physics friendly.

slender nymph
#

show the relevant objects and how you move the player

brittle linden
#

bet, let me download obs real quick so its not as laggy lol

slender nymph
#

just screenshot the objects, i don't need a video of the inspector

spiral lava
#

I cant move my char pls Help im new

slender nymph
eternal falconBOT
spiral lava
#

OK WAIT

slender nymph
#

it also appears that you have compile errors which you need to address

spiral lava
burnt vapor
eternal falconBOT
spiral lava
#

yes pls help

slender nymph
#

at least vs code appears to be configured in that last screenshot though

burnt vapor
# spiral lava yes pls help

What editor do you use?
If Visual Studio, and you downloaded it from the Unity Hub, press • :visualstudio: Visual Studio (Installed via Unity Hub)
If Visual Studio, and you downloaded it manually, press • :visualstudio: Visual Studio (Installed manually)
If Visual Studio Code, press • :vscode~3: VS Code
If JetBrains Rider, press • :JTRaider: JetBrains Rider

burnt vapor
spiral lava
#

i use editor visuel stodios code

#

fused

#

can you help me in a talk

#

i dont understand

slender nymph
#

hint: check your unity console

spiral lava
slender nymph
#

then there is something you are not showing because you have a public float variable which should appear in the inspector but was not in your previous screenshot

#

that indicates that either you've gone and made two components called Movement or you have compile errors. and since unity doesn't show any compile errors, i'm leaning toward it being the former issue

spiral lava
#

and what i have to do now

slender nymph
#

read my most recent messages very carefully

spiral lava
#

idk what is all this public float

slender nymph
#

then start smaller, there are beginner c# courses pinned in this channel and the pathways on the unity !learn site are a good next step after that

eternal falconBOT
#

:teacher: Unity Learn ↗

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

tidal thorn
#

So I got visual studio fully configured, and now my only issue is the console error about "interactable could not be found" from my previous message

#

This one

#

Old screenshot

spiral lava
slender nymph
#

okay and do you have a class called Interactable

slender nymph
burnt vapor
# spiral lava

This still does not appear to be configured. Please follow the Visual Studio Code link from the bot message to configure it.

burnt vapor
spiral lava
#

ok

tidal thorn
#

Like I said, i'm following a tutorial and I've been building this from scratch in line with the vid, which was also from scratch. Haven't added anything he hadn't, and he never touched on classes. Wouldn't know where to start looking

slender nymph
#

visual studio has a search feature you can search the project with to find out if you do have a class called Interactable

#

nobody here even knows what tutorial you are following so that's really the only advice that can be given with the information we have

spiral lava
#

can we go in a talk?

burnt vapor
#

Why? We already are

#

Any reason you don't use visual Studio?

spiral lava
#

yes

#

can we go in a talk where we can talk i can make stream

nimble apex
#

this script is guaranteed to run only in editor mode, can this coroutine run?

[ExecuteInEditMode]
public class UpdateTextAreaDimension : MonoBehaviour
{
    public void UpdateDimension()
    {
        GetComponent<LayoutElement>().preferredHeight = -1;
        
        StartCoroutine(Refresh());
    }

    IEnumerator Refresh()
    {
        yield return new WaitForSeconds(0.5f);
        
        GetComponent<LayoutElement>().preferredHeight = GetComponent<RectTransform>().rect.height;

        ContentParent parent = GetComponentInParent<ContentParent>();

        if (parent != null)
        {
            parent.RecalculateDimension();
        }
    }
}```
burnt vapor
#

Why? This chat works fine. Best I can do is make a thread

spiral lava
#

yes

nimble apex
#

i guess i dont need the coroutine

spiral lava
brittle linden
#

shoot

slender nymph
slender nymph
worthy veldt
#

i need code review, it worked but very ugly. it's to determine whether a recipe is "identical"

spiral lava
#

i have install

#

what now?

burnt vapor
#

Send a new screenshot

spiral lava
#

from?

burnt vapor
#

Your editor window

tidal thorn
#

Used the search, found a class called 'Interactable1' instead, changed the script to match that, and got two new errors

slender nymph
spiral lava
worthy veldt
spiral lava
slender nymph
# brittle linden boom

why does the player have a mesh collider on it? the CharacterController is the collider. also i'm not 100% certain since i don't typically use it, but i don't think the CC plays super well with non-convex mesh colliders so the ground collider should either be marked convex or just be made into a box collider considering the ground is just a plane. you also appear to have a broken script on the player

brittle linden
slender nymph
#

so remove it

brittle linden
#

yea i did but im still having the problem

slender nymph
#

and did you read the rest of what i said?

spiral lava
#

no

slender nymph
#

my guy, i'm not in a conversation with you

spiral lava
#

no

tidal thorn
#

Found the issue by changing the original class in the script to just Interactable, matching the name of the script and the class I was trying to reference. Seems to have done it

spiral lava
#

can any1 help me? i cant move im new

brittle linden
slender nymph
#

that error is unrelated, it is from the version control package. if you aren't using that package you can remove it, otherwise just clear the console and move on

#

anyway, if it is still not working then show the relevant !code

eternal falconBOT
brittle linden
#

oh bet that

brittle linden
tidal thorn
#

Thanks for the help @slender nymph, issue is fully resolved now

slender nymph
brittle linden
#

lmao idk

#

i was told to use this

#

so heres the code

slender nymph
#

yes. and for future reference, do not click "Basic" before sharing the code, just click save and share the link in your browser. selecting "Basic" removes all syntax highlighting

brittle linden
#

oh, my bad i never used this website lmao

slender nymph
#

so throw some logs in there to see if it is correctly detecting ground

spiral lava
#

can any1 help me i cant move im new

brittle linden
#

bet

visual linden
#

I would recommend using breakpoints and stepping through the code, if that's something you're familiar with.

slender nymph
burnt vapor
brittle linden
slender nymph
#

show how you have actually determined that. because if it is detecting the ground correctly then it shouldn't be moving you through it

slender nymph
#

you've been posting almost nothing but screenshots this entire time and suddenly you don't know how to post a screenshot?

spiral lava
#

i have

#

i mean how i can see the inspector

slender nymph
spiral lava
slender nymph
brittle linden
slender nymph
#

since when?

brittle linden
#

shoot

slender nymph
#

that was not in the code you showed previously so when did you add that?

#

and where are you actually using it

brittle linden
#

like 10 mins ago

#

in the code i posted

#

well i updated the code like 10 mins ago

slender nymph
#

well for one thing, that isn't actually doing anything so you aren't even using it to detect ground

#

and another, if you're going to completely change a fundamental part of the component while receiving help you should share all of the changes

brittle linden
#

huh? it put in the console "Ground detected". also my bad

slender nymph
#

that doesn't mean it actually does anything. all this tells you is that your raycast-which is being used for nothing-detects the ground. it has absolutely nothing at all to do with the ground check you do in your other code

#

are you just not familiar with the rest of the code that you wrote or something?

brittle linden
#

well, im only around 4 months into learning c# and i had to get A LOT of help to be able to make this code

slender nymph
#

but surely you bothered reading it to find out where you're even checking for ground before going and adding a useless raycast?

brittle linden
#

uhhhh well ive never used a raycast, i just learned it in my programming class at school 😅

slender nymph
#

so you didn't read your own code then?

brittle linden
#

yea, i read it. i just didnt think to check where im checking for ground.

#

😅

#

look man, i only got a c- in programming at school rn, im not amazing lmao

slender nymph
#

so if you read the code, and you read my message to add logs to ensure it was correctly detecting the ground, did you not perhaps think to put logs where it is currently checking for ground which you should know it is doing considering you allegedly read the code?

brittle linden
north gorge
#

hey folks, i have assets from some old game and would like to make a unity project around it. it's all custom formats and custom container archives. how would you go about doing that? i'm thinking of creating custom importers, but hitting some hard walls on the way (mostly because i don't know the right way for doing things in unity).

slender nymph
#

it is against server rules to discuss the usage or practice of ripping assets

brittle linden
#

im lowk gonna deal with all this bs tomorrow, im tired and i gotta wake up at 7

north gorge
slender nymph
#

sure, jan

ivory bobcat
#

Should you not just be able to open the original project and properly export/import them into your new project then?

north gorge
#

lol wtf, what's with the accusations from the very first message? 😄

lapis yew
#

I'm confused on what you want. If you own the assets can drag them into your project

north gorge
#

these are custom formats from very old game, none of it is recognizable by unity

ivory bobcat
#

But regardless

north gorge
#

i was thinking of writing the parsers and make the editor see those assets natively

#

but if that's not the way i guess i'll just convert

#

ok then

lapis yew
#

it seems like your problem lies outside unity

nimble apex
#

can u register event on a TMP text component?
im planning to attach a script with this function on large sums of TMP text, this function should execute whenever the TMP_text.text is modified by code or by inpsector or by any sorts of stuffs on runtime

    public void UpdateDimension()
    {
        GetComponent<LayoutElement>().preferredHeight = -1;
        
        LayoutRebuilder.ForceRebuildLayoutImmediate(GetComponent<RectTransform>());
        
        GetComponent<LayoutElement>().preferredHeight = GetComponent<RectTransform>().rect.height;

        ContentParent parent = GetComponentInParent<ContentParent>();

        if (parent != null)
        {
            parent.RecalculateDimension();
        }
    }```
nimble apex
#

ofc i can always call this function after the code changed the text, but im wondering if i can do onvaluechange

nimble apex
slender nymph
timber tide
#

oh yeah

nimble apex
#

lol looks like input field is more advanced

#

buuuuut that UI was supposed to be plain text

slender nymph
#

it's not "more advanced" it's just that InputField expects to be changed by user input

timber tide
#

You can probably use the input field

#

and just disable it being interactive

#

or just make your own event

slender nymph
#

i don't think modifying it via the inspector would invoke that event though which is what they want

timber tide
#

Ah, ok then OnValidate it is then (or ISerialization)

nimble apex
#

but that shouldnt be a problem

thorn tree
#

how do i disable a canvas ?, i took the reference through code

slender nymph
thorn tree
#

thanks i just started learning code

#

also is there any way to get the panel through code and not the canvas?

hexed terrace
#

there is no such thing as a panel

slender nymph
#

the panel is just an Image component

hexed terrace
#

panel is just a game object with an image already on it and named 'Panel'

thorn tree
#

oh lol kk then i guess "Image" should work

#

thanks

slender nymph
#

but note that disabling that component only hides that image, you'd have to disable the entire GameObject if you wanted to also hide child objects (or use a CanvasGroup to modify their alpha)

thorn tree
#

i will stick to the canvas then

hexed terrace
#

depending on what you want to do, canvas group is probably a better option - it allows you to fade on/off, instead of instant show/ hide

thorn tree
#

is something i am not doing nicely? i cant see the canvas when the player collides

slender nymph
#

have you confirmed that code is running

hexed terrace
#

You wouldn't toggle the canvas component for visibility, just do the game object

thorn tree
#

yeah the time stops nicely after it collides

thorn tree
#

mb

#

but i am new

hexed terrace
#

show the hierarchy + inspector for the canvas

thorn tree
hexed terrace
#

and at run time, before you collide with this object.. the cavnas component is disabled?

thorn tree
#

yeah

#

ok i tried this and its working

hexed terrace
#

😄

thorn tree
hexed terrace
#

IIRC UI interactions dont work with 0 time scale, it's not a good way to pause gameplay

thorn tree
#

kk

hexed terrace
thorn tree
hexed terrace
#

not really - ask specific questions and I / someone will answer if we can / are free

thorn tree
hexed terrace
#

flappy bird is an extremely common game to make, there are hundreds of tutorials around for that

tight fossil
#

is there a way to make sort of a folder inside visual studio where I can keep only certain scripts? Instead of having these tabs + the drop down on the right, maybe like a second drop down with only scripts i put in there or something along those lines?

inland cobalt
#

Hey all, if something exists within a trigger when the game is started, is onTriggerEnter called? And if so, does this happen before Start()

hexed terrace
#

you can test that, Im 99% sure the answer is no

timber tide
#

Trigger methods require some collider intersection

burnt stirrup
#

camera animation is causing script to bug, any fixes?

hexed terrace
#

Yes

cerulean badger
#

I want to make a script that stores some public methods, like some sort of manager that I use in other scripts to make things more organized and stuff. How would I do this?

burnt stirrup
cerulean badger
#

yea, basically that

burnt stirrup
cerulean badger
#

yep

burnt stirrup
#
interface myInterface
{
public void myFunction;
}
#

i havent really tried defining a function but this works for me

#

(outside monobehaviour class btw)

#
Monobehavior, myInterface:
 public void myFunction{
//code goes here
}
cerulean badger
#

k, got it

void dawn
#

need someone to help me fix my zombie enemy AI

frosty hound
#

You need to properly !ask a question then

eternal falconBOT
void dawn
#

so im trying to make a zombie enemy that once he spots the player he will go after him and attack him , simple right ? well i tried to implement it , the model wont do any animations , he goes flying into the air for some reason i don't know , he wont go after the player , i made a script for him , i dont know whats wrong but please help me