#๐Ÿ’ปโ”ƒcode-beginner

1 messages ยท Page 437 of 1

vital tangle
#

here is a debug

#

i dont know how to parse it then

rich adder
#

so use kinematic.
immobilize gravity is a weird term

vital tangle
#

if its not a JObject

steel stirrup
#

immobilize the player, gravity included

rich adder
#

idk immobilize gravity I assumed they just wanted to "pause gravity"

steel stirrup
#

set rb.isKinematic = true

pallid nymph
#

can't you just use JToken? if not, you technically would need to handle each subtype of JToken separately

vital tangle
#

it also failed

#

sadly

rich adder
pallid nymph
#

it can't fail

#

because that's the type of the objects

vital tangle
#

wait let me show proof

pallid nymph
#

I mean, if it fails, it fails in a different way

steel stirrup
#

save rb.velocity to a variable and set the rb's velocity to 0. When you want to continue moving, set the rb.iskinematic true and then use rb.addforce(cached velocity, forcemode.velocitychange)

pallid nymph
#

๐Ÿ™‚

steel stirrup
#

Are you trying to parse a json?

vital tangle
steel stirrup
#

Why are you manually dealing with jobjects and all that?

vital tangle
#

like the keys look orange

#

and the strings look green

steel stirrup
#

As in you're making a json editor?

vital tangle
#

the int looks blue

vital tangle
#

i made everything work

#

aside from the JArray

#

dont know how to parse them

pallid nymph
#

whatever you do for "everything else" do it for each element of the JArray recursively

steel stirrup
#

Is this just an academic project?

vital tangle
#

i am still 18

#

no university yet

steel stirrup
#

alright, is there some reason you want to edit a json in this way?

#

It's kind of going about things completely backwards

vital tangle
#

but just showcase

steel stirrup
#

Yes even then

#

It's a terrible format for that

vital tangle
#

๐Ÿฅฒ

steel stirrup
#

What I mean to say is, why are you showing a user the json at all, instead of the actual object it describes?

#

JSON is a storage format. It's convenient because it's plain text, but it's not particularly user friendly

#

It also tends to sprawl quite a bit, especially with collections, and can get borderline incomprehensible if it needs to support references

vital tangle
#

yea same troubles here

steel stirrup
#

Yeah so skip the json

#

just show the object

vital tangle
#

even if i want to show the objects
I still need to parse the JArray

#

i dont know how to do that

rich adder
steel stirrup
#

Why? You can simply deserialize your json to the object and work on your collections there

vital tangle
#

just random json files

steel stirrup
#

Then you're basically just building a json viewer, which is totally valid but a tad pointless. In that case I would honestly say just go look up the regex you need, I'm sure it's floating around

vital tangle
pallid nymph
#

and you had 2 problems ๐Ÿ˜›

vital tangle
#

but it was too complicated to use
so i tried this method

fathom bramble
#

How is this possible? why is a non-prefab enemy able to accept the players transform but the prefab version of the same enemy calling it a type mismatch? It's the same exact script???

vital tangle
steel stirrup
#

I didn't even know there was a type mismatch message notlikethis

short hazel
#

"the plural of regex is regrets"
More seriously, parsing abstract JSON and going through all of its elements is easily doable with type checks, and a recursive method

#

The root of a JSON file will always be an object { } or an array [ ]. Go through all of its elements. If one of the elements is itself an array or object, call the method recursively on the child element

vital tangle
#

not like the root
but i cant parse an array

short hazel
#
void ParseArray(JArray array)
{
    // however you list the elements are here...
    foreach (var element in something)
    {
        if (element is JArray arr)
          ParseArray(arr);
        
        // implementation for other data types go here...
    }
}
#

Do one for a JObject where it lists the properties recursively and you're done

vital tangle
#

what does a JArray contains normally
isnt it JObject {}

short hazel
#

The docs will tell you what's available to get on that type

#

There most likely is the inner elements collection yes

vital tangle
#

its kind of like not stated cuz i got type as JValue which was an integer

#

how can an array contain and integer directly without any JObject

short hazel
#

[ 42 ] <- like this

#

JArray contains JObject which is really an int

#

That's why you need to type-check

vital tangle
#

ohhhhhhh

#

and i got 3 objects type from JObject type as well

#

when i ran a loop

#

like 92 int and 3 objects

#

it really goes over my head like how does it work?

short hazel
#

You should post the original JSON payload, but an int and 3 objects would correspond to something like

[
  42,
  { /* ... */ },
  { /* ... */ }
]
vital tangle
#

my json looks something like this

#
  "Cages": {
    "Array": [
      {
        "Dogs": 2,
        "Cats": 4
      },

      {
        "Dogs": 6,
        "Cats": 1
      }
    ]
  }  
}```
#

just a simplified one

short hazel
#

Yeah, so first things first, the root element is not an array, it's an object. With one property, "Cages", which is itself an object, which contains an "Array" property, which is an array that contains two objects

#

So yes you definitely need a recursive algorithm to scan all of that

vital tangle
#

isnt the cages key in the JObject?

#

and the rest of the JArray is the value of that key?

short hazel
vital tangle
#

ok so keys are like objects

short hazel
#

No, { } is an object

vital tangle
#

ohhhh

#

now it makes sense

#

the array contains 2 objects inside which there are simple keyvaluepair<string, object?>

pallid nymph
#

you need something like

Parse(Jtoken jt) {
  // handle boring cases
  if (jt is JArray jarr) {
    // foreach subelement call Parse(array[i])
  }
  if (js is JObject jobj) {
    // go over each key value pair and call Parse(value)
  }
}
sleek marten
#

I've got this script that loads a new scene when a button is pressed

// That scene will be loaded when prompted to

[SerializeField] Object scene;

  public void LoadScene()
  {
    SceneManager.LoadScene(scene.name);
  }
}```
It WAS working in the build but now it's not loading the scene at all. It DOES load the scene while in the editor. Does anyone have any idea why making the build could stop the scene from changing?
vital tangle
#

let me try if it works

copper matrix
#

why is it wrong

pallid nymph
raw token
vital tangle
#

yoooo
it worked

sleek marten
copper matrix
vital tangle
sleek marten
eternal needle
pallid nymph
sleek marten
pallid nymph
raw token
# copper matrix

huh... Is that the same message when you hover over the red squigglies in your IDE?

eternal needle
sleek marten
eternal needle
#

I doubt what you're doing would work considering SceneAsset is unity editor only. So dont think you can just use object to get around that

sleek marten
#

I've made a few builds and never had an issue

#

I must have done something then

#

something dumb

#

but what?

eternal needle
#

Are you using version control? could just see what changed directly
Or start debugging in your build

copper matrix
sleek marten
#

it's just that single line that isn't running

sleek marten
rich adder
copper matrix
#

what :(

rich adder
#

does it take you to the Unity Scene Manager

polar acorn
eternal needle
# sleek marten could be that since I'm not on VC

I don't know what a debug countdown is. I meant debug specifically like the name. Because that's all you're passing into the method anyways.
Also you should be using version control but it's not like this is related to your issue suddenly happening

sleek marten
#

I'm doing a countdown as a way to debug

copper matrix
sleek marten
#

like this

copper matrix
rich adder
copper matrix
#

nope :(

rich adder
#

You should not name class name something already taken by unity

#

the Compiler has no clue which one you want to use unles you specify its Namespace
eg
UnityEngine.SceneManagement.SceneManager

eternal needle
raw token
#

Why doesn't it complain about the ambiguity, in this case? Does it just default to the current namespace, and only whine if you import multiple namespaces with conflicting definitions?

polar acorn
rich adder
polar acorn
rich adder
#

much better explanation lol ^

polar acorn
#

If they're both external, they're the same "priority" and it throws the ambiguous reference exception

raw token
#

Oh alright - I suppose that makes some sense. But good to know in any scenario. Thanks ๐Ÿ™ƒ

sleek marten
#

which it is

#

so I narrowed down the problem to the scene loading specificially

eternal needle
#

you could narrow down the problem even further if you just debug the name like i suggested

sleek marten
#

I'm doing that next

eternal needle
#

and debugging the name, in the same method as youve shown above would also told you the code is running

sleek marten
#

hey, well, all roads and what not

hushed hinge
rich adder
#

doing what right ?

#

can you give me a TLDR cause thread is too much commitment ๐Ÿ˜›

hushed hinge
rich adder
hushed hinge
rich adder
#

TLDR ideally you should explain in a few words.
What is happening vs what you expect

eternal needle
#

yea honestly i cant even find what the issue is myself and i dont really wanna read through a whole thread (even from that link) to try understanding from just messages between you and someone else

hushed hinge
#

well i am having problem with the muon count firt, but then we jump over to this whole saving system... but i just wanna fix the muon text changing first that like when you rescue a muon from a scene one time, it would trigger that a number chanes up on the ui text in the other scene

summer stump
hushed hinge
#

https://gdl.space/hanutixoya.cs and i changed "0" on _allMons to "15" so i can finally show how many muons there are instead of counting how many muons there are from different scenes...

steel stirrup
teal viper
summer stump
rich adder
#

if they have their own script just search the component directly

hushed hinge
polar acorn
#

Are you just trying to maintain a count of some kind of object?

#

Is that all that's necessary?

steel stirrup
polar acorn
#

Or is there more to it

teal viper
steel stirrup
#

just increment an int on creation and destruction

rich adder
summer stump
rich adder
#

public List<MuonScript> muons
mouns = FindObjectsOfType<MuonScript>();

teal viper
steel stirrup
hushed hinge
steel stirrup
#

simply adding/removing to a collection adn using the built in .Count is probably the most flexible

hushed hinge
polar acorn
teal viper
ionic zephyr
#

How can I controll that if I click on one slot, the background highlights but the other slots background stays normal?

ionic zephyr
rich adder
#

are you assuming we know what your specific setup is :?

polar acorn
hushed hinge
ionic zephyr
summer stump
steel stirrup
# ionic zephyr Do I have to have a reference to ALL the slots?

Usually it's easiest to just have the collection since you'll want to update them at some point anyway most likely, but if you really don't want that then you can have each slot register a listener to a static event that passes the currently selected slot Then each slot would compare itself to the currently selected and set its visual accordingly

polar acorn
hushed hinge
polar acorn
steel stirrup
polar acorn
steel stirrup
#

You can either have a central controller that has references to all slots and updates them on changing the selected slot, or use an event and have each slot register itself to that for an update, same end result just a slightly different flow

ionic zephyr
hushed hinge
polar acorn
ionic zephyr
polar acorn
#

And how many are left?

hushed hinge
# polar acorn And how many are left?

i choose the number 15 there because that's how much are the amount together from the different scenes, since each scenes have 3 entities, and when you touch one, it would trigger a number going up in the ui text in the level select scene

ionic zephyr
hushed hinge
rich adder
# hushed hinge what?

https://en.wikipedia.org/wiki/Magic_number_(programming)

A unique value with unexplained meaning or multiple occurrences which could (preferably) be replaced with a named constant

In computer programming, a magic number is any of the following:

A unique value with unexplained meaning or multiple occurrences which could (preferably) be replaced with a named constant
A constant numerical or text value used to identify a file format or protocol (for files, see List of file signatures)
A distinctive unique value that is unli...

polar acorn
polar acorn
steel stirrup
hushed hinge
polar acorn
hushed hinge
steel stirrup
#

In those classes you'll stick all your backend logic concerning how your inventory system works. Then, you'll create your UI hierarchy and create a Manager monobehavior that contains the prefab + necessary references and positioning information and a slot monobehavior that contains all logic needed to display a single slot

summer stump
polar acorn
hushed hinge
summer stump
steel stirrup
#

Your UIManager should then take as input your InventoryManager and create a UISlot object for each slot in that manager, and then pass that UISlot a slot which it will render

ionic zephyr
hushed hinge
steel stirrup
summer stump
steel stirrup
#

Separate UI and game logic entirely

#

Nothing about an inventory is realtime, it should go in a regular C# class that doesn't inherit monobehavior

ionic zephyr
steel stirrup
#

only the UI controllers need to be monos

polar acorn
#

If you need to save the data, you can just serialize that object to disk using JSONUtility, and reload it when you start the game

ionic zephyr
# steel stirrup Separate UI and game logic entirely

My architecture is all about having an ABSTRACT InventoryManager which is a list that stores objects, A CentralInventoryUI in which I separate my objects into slots of prefixed capacity. Then that distribution is passed to all of the different inventory UIs (The main one, the one in the crafting station...)

steel stirrup
#

also by definition your inventory cannot be abstract since you actually seem to plan on, you know, having an inventory

hushed hinge
ionic zephyr
rich adder
summer stump
# hushed hinge

Yeah, you need to make changes of course notlikethis
That doesn't mean it won't work....
Put the object counting the muons on a root object

steel stirrup
#

abstract has a very specific meaning

ionic zephyr
steel stirrup
#

You're actually talking about what I was saying before

polar acorn
steel stirrup
#

99% of your code should NOT be in a monobehavior

polar acorn
#

Why is it on a child object in the first place?

steel stirrup
#

so yes, your inventory should be a regular boring object and it will have a collection of items, then you'll pass your inventory to a InventoryUIController mono etc

hushed hinge
polar acorn
polar acorn
steel stirrup
#

In something like an FPS or a physics game probably the majority of code is going to be in monos

rich adder
steel stirrup
#

The closer you get to a spreadsheet/strategy game the more you want to just use Unity for UI and little else

#

Also, anecdotally, the fewer monos you have the less of a pita save/loads become down the line

cinder crag
#

so i have my turrets working but the bullets are weird like they arent rotating with the tip of the bullet towards the enemy or and they are in the same position , im a bit confused

rich adder
steel stirrup
summer stump
cinder crag
steel stirrup
rich adder
#

so your question is self answered lol

steel stirrup
#

think about it this way, the bullet should be going forward out of the barrel of the gun, which is hopefully also pointing forward

rich adder
#

pass the firePoint.rotation on instantiate

cinder crag
#

okay the firingpoint had the red arrow pointing in the wrong direction

#

fixed it

hushed hinge
summer stump
hushed hinge
polar acorn
#

Why are you assuming the text needs to be the Singleton

cold belfry
#

Hey does anyone know how to adjust the rotation offset of the rotation constraint GameObject Component? I've been searching the internet for like an hour and I can't find any documentation on this.

steel stirrup
rich adder
#

they're talking about the component

#

in the inspector

cold belfry
cold belfry
#

yes im aware, im trying to dynamically adjust the offset

rich adder
#

at that point why even use the rotation Constraint if you can just do it via .rotation

cold belfry
#

yes, hyunahri's snippet helped a lot tho

#

bless you

steel stirrup
#

anyway @cold belfry if your IDE is setup right you should be able to just start typing the name and have it pop up

cold belfry
#

it works now

steel stirrup
cold belfry
#

yeah that's strange i don't know why it didn't autofill for me

rich adder
rich adder
eternal falconBOT
cold belfry
#

either way thanks a lot yall ๐Ÿ˜„

rich adder
#

make sure your ide is configured ๐Ÿ˜›

cold belfry
#

i will

steel stirrup
#

and you probably already know this, but you can almost always get all the available methods and their params & overloads by just typing '.'

rich adder
#

*if your ide is configured

hushed hinge
rich adder
#

its above tilde key

steel stirrup
steel stirrup
#

colorful

rich adder
steel stirrup
#

it's a period, not code lol

rich adder
#

well . makes more sense, they might confuse the ' to be used

#

technically an Operator not a period

steel stirrup
rich adder
steel stirrup
#

It's an access identifier

#

not an operator

rich adder
#

access identifier ?

#

never heard of it

hushed hinge
steel stirrup
#

|, &, ?? are operators

#

. is just for access

hushed hinge
rich adder
#

operator

steel stirrup
rich adder
#

These operators include the dot operator

cold belfry
summer stump
# hushed hinge also..

Did you google it. When you haven't heard of something, take the time to research it on your own

rich adder
cold belfry
#

sure

cold belfry
#

im using vscode

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

rich adder
#

make sure you get rid of the older Visual Studio Code Editor package too

cold belfry
#

yes i followed all the steps

rich adder
summer stump
rich adder
#

check Output window for any errors

#

yes from Package Manager

cold belfry
#

alright hold on ill try regening project files

polar acorn
rich adder
#

just realized 2023/6 didnt even include the Visual Studio Code editor package anymore.. nice.

polar acorn
polar acorn
#

I guess? What is the string

#

And int

rich adder
hushed hinge
#

I don't know... i just searched up what dictionary is

rich adder
#

and what is it?

#

by now you know the differences between local variables and member fields right?

hushed hinge
#

yeah

rich adder
#

okay because you can only use that dictionary in awake right so idk what ur intentions is

summer stump
cold belfry
#

im on unity 2022

rich adder
summer stump
cold belfry
#

i can't remove it though

summer stump
rich adder
#

its locked to Engineering thats why

cold belfry
#

ah ok

teal viper
hushed hinge
rich adder
#

no thats a property.. completely unrelated to dictionary or declaring one

frosty hound
hushed hinge
polar acorn
cold belfry
#

alright i removed my visual studio code editor package as well as engineering, i now have solely visual studio editor package installed, additionally i regened my project files. I am still unable to see available params etc

rich adder
#

check for any errors for .NET SDK

cold belfry
#

the output is somewhat large should i post it in here?

rich adder
#

or dotnet command not found

cold belfry
#

let me see

cold belfry
# rich adder or `dotnet` command not found

something akin to this yes
2024-07-24 16:43:55.286 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-dotnettools.dotnet-interactive-vscode' wants API proposal 'languageConfigurationAutoClosingPairs' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.

rich adder
cold belfry
#

Wait im incredibly stupid, it's working now, sorry for the confusion

rich adder
cold belfry
#

Thank you for your help though you are genuinely a goat

summer stump
copper orbit
#

what is the point of the singleton here and the Instance= this. Will this ensure that there is just one instance of AIManager?

hushed hinge
rich adder
#

you should however deal with also a edge case where theremight be two AIManager scripts in one scene

#

good example here ^

copper orbit
rich adder
#

AIManager.Instance.Spawn() for example

#

the difference here is that you dont make everything like methods and field in the class static. Doing that would cause other issues, in unity specifically you wouldnt be able to assign any static field through inspector

graceful walrus
#

I need to run some functions to initialize some data before the game starts because many scripts will rely on this data being initialized. How can I do this without worrying about keeping references to each script that requires such data?

rich adder
pallid nymph
#

*some whisper from the distance*: Just don't do DDOL singletons, they'll make you really sad!

rich adder
#

I mean..Singleton is valid too but I think they said they want to avoid reference ? idk

hushed hinge
ionic zephyr
#

If i want to display the information of a slot should I have a Display component on the Slot that passes to a Manager that displays it?

#

should it be an EventTrigger?

graceful walrus
rich adder
#

closer to a static variable

#

if you change 1 scriptable object value it changes for all of the ones that have that SO

#

so its the same instance yea

steep rose
#

well we would need to see some code

#

we cant really help you without seeing anything ๐Ÿ˜…

#

well use this !code format and you will be fine

eternal falconBOT
rich adder
#

You can just state your issue there are more people here lol its not a turn based help channel

steep rose
#

this is the absolute truth this

#

which script handles the item?

rich adder
#

I read it and still dont understand the issue

steep rose
#

lets start with that one

rich adder
#

can you give me a quick , whats supposed to happen vs what is happening instead

steep rose
#

the item is supposed to be filling an item paremeter in the inspector

#

its not

#

thats what i saw

rich adder
#

through code?

steep rose
rich adder
#

so what happens otherwise

#

alr send the code as links from sites linked above

steep rose
#

we would need to see the specific code that is supposed to do so

rich adder
#

send relevant scripts lol

#

if you have so many scripts to handle a specific thing you might have a design issue to begin with..

#

is it throwing an error ? start with the stacktrace

#

ok so first one to start is InventoryUIManager

#

UnityEngine.Debug:LogWarning is a custom message though ? did you write this script or get it from somewhere ?

#

I would avoid "AI" as you're learning because it can mislead you and also not teach well what you're writing

#

where is DropItem called

#

InventorySlotButton ?

#

send that

steep rose
#

im looking more towards slot.SetItem(item, itemPrefab);, they said the item slot is not filled up so they cant really drop nothing

#

well i guess i just found the script i was looking for

rich adder
#

where is SetItem called

steep rose
#

lol

#

is it clearing the item? i see a clear item script

rich adder
#

SetItem is probably passing a null somehow

molten orbit
steep rose
#

give it, please

rich adder
#

so you have a InitializeInventorySlots with null

steep rose
#

which script

rich adder
#

InventoryUIManager

#

are you destroying the item gameobject ?

#

this might be a reference issue where you're destroying the item

#

im talking about the item though

#

is that ClickableItem

#

what is item

#

yes but gameobject wise, is it something you do destroy or something

#

when do you destroy it ?

#

no Im just asking if you're destoying the gameobject before Drop

#

cause I see it says missing in your screenshot

#

I can't read on white background sorry

#

also screenshots ๐Ÿ˜ตโ€๐Ÿ’ซ

#

I understand the intention but its important to know if you are destroying it somehow before hitting DropItem because you wouldnt be able to drop a null (destroyed) object

#

transform.Find("Border")?
also don't use?. on unity components

#

doesnt work

#

look at the inspector since the field is public

#

before you hit drop item, check if the item is in the field of inspector

#

visually looking at it

#

start narrowing down issues

#

so when you pick up item it says Missing ?

#

under Item ?

#

what about the slots

#

InventorySlotButton slotButton = slotObj.GetComponent<InventorySlotButton>();

steep rose
#

where is ClearItem() called, sorry i was away for a bit

rich adder
#

thats inDropItem

#

which is After the error/warning but only runs if item is not null

steep rose
#

ah

#

nevermind then

rich adder
#

no. the List

#

that you initialize

#

screenshot that during playmode when you said it shows "missing"

#

yes

#

want to see if you already missing all of the newItems there

#

make sure to uncollapse the list elements

#

on InventoryUIManager the List of Slots

#

wait its private

#

nvm

#

put [SerializeField] private List<InventorySlotButton> slots = new List<InventorySlotButton>();

#

line 13, on inventoryUImanager

steep rose
#

it basically makes the list visible

#

without being public

rich adder
#

yes seems like the slots are initialized correct but the item is not

#

then passing null and causes the warning

#

the code is a bit confusing at first glance

#

yeah show the list during playmode

steep rose
#

i know this is vague but do you know where you set item to null or delete it?

#

i cant think of anything else

#

that would cause this

#

the inspector

rich adder
#

no mate. this is not a list, these are gameobject

steep rose
#

in playmode

rich adder
#

the List is the thing that says List in the code

#

oh right they are components and not a poco

#

ok my mistake

#

they will not show the nested fields

steep rose
rich adder
#

so each one of those has missing as item

#

or is it just 1?

#

does this run ?
Debug.Log($"SetItem called. New item: {item?.name}, New itemPrefab: {itemPrefab?.name}");
what does result say

steep rose
#

an item can fill up one of those slots

#

that shouldnt be a problem

#

unless unity wanted to be a dingus today ๐Ÿ˜‚

rich adder
#

its already in your script lol

#

im asking what its printing

#

yes If i were you Id start from scratch

#

and not touch ai

#

at all

#

following a guide maybe but you have to understand your own code to debug it

steep rose
#

is it even getting a slot to put something in?

#

or no

rich adder
#

knowing what Debug.Log($"SetItem called. New item: {item?.name}, New itemPrefab: {itemPrefab?.name}"); prints
should shine some light on what it is exactly being SetItem with

#

(missing) usually implies the gameobject was destroyed

#

wdym by "Destroy" messages

#

is that one the one that works?

#

or the one "missing"

#

you can put this

void OnDestroy(){
Debug.Log($"{name} was destroyed", this);
}```
inside `Item` script
#

but its printing the correct name right

#

because you're grabbing that from item

#

{item?.name},

#

it would throw null otherwise

#

having to fill manually is not "function correctly" lol

#

you're covering up the main issue which is why item goes missing

#

well yes because its passing the null check..

#

if (slot.item != null) // Ensure there's an item to drop

#

You put this warning here
Debug.LogWarning("No item to drop.");

#

if its not found

#

so finding out why is going null

#

check if it printed anywhere

rare valve
#

sorry for interrupting your conversation, but can someone help me with this problem? I don't see how the game object is both active and inactive

rich adder
#

well there you go..thats why its missing

rare valve
#

hm i'll check rq

rich adder
#

the power of debugging โš”๏ธ

#

which script does it btw

#

either I'm blind or you never sent it

#

no i mean which scripts destroys it lol

rare valve
#

the parent is active too

rich adder
#

ahh so you did never sent it. Good to know I'm not going blind

#

remember reference types are pointing all to the same object

#

so if you remove it from the scene, its gone everywhere else

#

why destroy it if you're gonna use again to drop it or whatever, easier to just hide it. aka Inactive

#

Debug.Logs or logs in general can be very useful if know how to use them ๐Ÿ˜ˆ

#

yes tbh should've been your first thing you learned in unity lol

#

debugger is next , you will be on some 5D galaxy brain

rich adder
#

thats od

rare valve
#

how do i check that?

rich adder
#

is the Checkmark on ?
but it probably has a specific warning on disabled component

rich adder
#

no crop preferably i mean

rare valve
#

theres 2 errors but they're from an unused script

rich adder
#

if its unused why would it error?

rare valve
#

i have no clue
its not even connected to anything in that scene

rich adder
#

no crops

#

including the sides

rare valve
#

oh okay one second

#

wdym the sides?

rich adder
#

edge to edge no crop

rare valve
rich adder
rare valve
#

which one

rich adder
#

the one that calls Animator

#

i feel like one of the parent is inactive when this is called

rare valve
#

this is the whole tree for that one

#

enemy has the script, sprite has the animation

rich adder
#

oh

#

what is GoblinEnemy child of

rare valve
#

root

rich adder
rare valve
#

yes

rich adder
#

something obvious I'm not seeing lol

rich adder
rare valve
#

its a little complicated, but first update runs in something else, then if a key is pressed the player moves and it calls the tick, then in the enemy script when it recieves that it tries to move towards the player

rich adder
rare valve
#

yeah its turn based

rich adder
#

oh okay. Not sure it would matter unles you're calling it on the wrong component which doesnt seem you are..

#

maybe step through code with debugger and see whats happening when that line is hit

hushed hinge
summer stump
#

Yes, using JSON or Binary files. JSONUtility was mentioned earlier, have you researched it yet?

hushed hinge
#

but don't i already have the load and save code there?

rich adder
#

where is GameData stored

summer stump
rich adder
#

the one you pass in the saving /load method

#

the instance, not the class definition

summer stump
#

Honestly, if you just go back through those MASSIVE threads, you've been told everything you need. You just need to take more time reading them and actually thinking about it
You are trying to go too fast which makes you ignore things

rich adder
#

this aint even it

#

go back n read the threads, because the load and save is the same across..

#

just apply it to different data..

summer stump
hushed hinge
#

no

summer stump
#

Ah, too slow with my edit....

#

Where do you CALL LoadData

#

You know by now that if a method is not called, it will not run

uncut trench
#

Yo

elder kite
#

so guys, I watched a toutorial where they typed Rigidbody, and Mathf into a script editor from unity and it turned green, does anyone know what extensions and scripe editor is best to do this?

eternal falconBOT
summer stump
#

Depends on which ide you use

#

Find the right one in that list and follow every step

uncut trench
summer stump
hushed hinge
summer stump
#

And I said call LoadData, not LoadData calling somewhere

uncut trench
#

So in here is all beginners

summer stump
#

Are you asking if everyone in this channel is a beginner? Or if the channel is only for helping beginners? Or what?

  1. no
  2. yes
  3. not sure
hushed hinge
summer stump
summer stump
uncut trench
north merlin
#

this is my first time seeing a void function like this. How would i go about calling it? Tried alot of stuff but always get a null exception error. public void NextSentence(out bool lastSentence)

uncut trench
#

Yea I need to learn coding

summer stump
rich adder
#

NextSentence(out bool lastSentence)

summer stump
#

NextSentence(out bool lastSentence)

uncut trench
#

Can anyone train me

summer stump
#

!learn

eternal falconBOT
#

:teacher: Unity Learn โ†—

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

uncut trench
#

Dang

hushed hinge
summer stump
#

Not the script. The instance of the class in memory

rich adder
elder kite
# summer stump !ide

If I press help and go to unity API refrence I can see the commands I am looking for, but they do not come up under suggested when I try to type it

hushed hinge
rich adder
#

so why do you ask such questions?

north merlin
rich adder
#

the instance is the one that is created new() somewhere. So your question makes no sense. you should know where you put it

summer stump
#

Unless you have a bool variable called i within that scope?

north merlin
#

yes it is

elder kite
summer stump
rich adder
summer stump
north merlin
#
 public void SetAutoButtons()
 {
     Status.instance.yes.onClick.RemoveAllListeners();
     Status.instance.no.onClick.RemoveAllListeners();



     Status.instance.yes.onClick.AddListener(() => CompleteTask());
     Status.instance.yes.onClick.AddListener(() => dialogueManager.NextSentence(out i));

     Status.instance.no.onClick.AddListener(() => dialogueManager.NextSentence(out i));
 }```
#

just throws a null exception;

rich adder
summer stump
#

Well that is because dialogueManager i null

#

Not because of the method call

#

Most likely at least

north merlin
#

let me double check that

summer stump
#

Show the exact error, word for word, including the stack trace.

Edit: if you don't get it yourself

north merlin
#

bloody hell. Thanks. Im so dumb

summer stump
#

Nice. No problem

#

And no, not dumb! We all do stuff like that

hushed hinge
summer stump
summer stump
#

You mean the instance of GameData?

rich adder
summer stump
#

Just looked, you did mean a static variable called Instance....
That is NOT what instance means, which leads me to believe you do not know what an instance is

#

Also, you do not even set Instance in that script, so it is null notlikethis

hushed hinge
#

it is not so easy to remember everything since all i do is forget and forget, that is what I always do...๐Ÿ˜ข

elder kite
summer stump
north oar
#

in 3d for making a player move i have the getaxis for horizontal for left and right arrow but what do i put to make the player move on the z axis..?

rich adder
elder kite
summer stump
rich adder
summer stump
final trellis
#

so I have this procedurally generating texture, but when i save the scene it vanishes into dark. is there a solution for this? or will it just not matter since the scene probably wont be saving during gameplay

elder kite
summer stump
rich adder
#

the solution is not even loaded

summer stump
#

It is in unity

hushed hinge
elder kite
summer stump
#

An instance is a specific object in memory

rich adder
#

@hushed hinge no, instance the object created from the Blueprint. Aka a class/struct
Unity instance also can refere to GameObject/Component

summer stump
# elder kite huh?

What do you mean huh? If you look at the guide, it tells you where External Tools is. It is not in Visual Studio, it is in Unity

#

The one you screenshot is different

rich adder
#

I meant created

summer stump
hushed hinge
#

oh

#

well... i don't know what i'm suppsoed to write in the loadgame or savegame to save the uptatedtext from MuonCounter script...

rich adder
#

you're passing GameData from somewhere, decide where to store it

summer stump
#

You call LoadData and pass in the GameData instance (which is in a dictionary if I remember right)

hushed hinge
summer stump
# elder kite

Ok nice.
Close visual studio, then Click regenerate project files right there

rich adder
summer stump
summer stump
rich adder
elder kite
rich adder
hushed hinge
summer stump
#

Where are you opening it from? Inside unity?

rich adder
hushed hinge
hushed hinge
rich adder
#

so you know how to save score? its the same exact process..

summer stump
#

@elder kite Ok, did you install the workload in Visual Studio? It would be this part

summer stump
hushed hinge
hushed hinge
rich adder
hushed hinge
#

i thought you meant that

frosty hound
#

@hushed hinge I'm not going to keep pointing you to use a thread.

summer stump
north oar
#

how do i find cinemachine from this?

frosty hound
#

You're only viewing packages you have installed in your project. Open the drop down to see them all.

fringe plover
#

@fathom bramble chan you show !code

eternal falconBOT
fringe plover
#

or atleast error message

fathom bramble
#

Is this easier to see?

#

or do you prefer the text

#

but basically I get a null reference with ui.TriggerGameOver()

fringe plover
#

then show me that method..

#

wait

teal viper
fringe plover
#

i forgot abt that..

fathom bramble
#

that's what I'm asking, how do I assign it? Unity screams at me if I use new

summer stump
# fathom bramble

You probably want the serialized reference method in the link I sent before.
Just drag and drop it

topaz mortar
#

I need some help with UGS Cloud Save.
I'm saving my Character to cloud save, you can just directly save the class, no need to serialize it or anything.

How do I prevent game crashes when the data structure changes?
How can I check if the data structure is still intact without crashing the game?
How do I prevent overwriting an existing Character that fails to load?

summer stump
teal viper
eternal falconBOT
#

:teacher: Unity Learn โ†—

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

topaz mortar
summer stump
topaz mortar
#

you can also use the Instantiate method, which you use to create new MonoBehaviours instead of new

#

but I doubt that is what you need here

fathom bramble
#

and manually dropping it is not an option either

summer stump
#

Not the script itself

#

A script is a blueprint, it does not "exist"
You need an instance of the class, which is a component on an object

#

So create an empty gameobject, attach the UIManager, then drag that object into the box

#

MonoBehaviour inherits from Behaviour, which inherits from Component

That is important to keep in mind. All MonoBehaviours are going to need to be a component of a gameobject to be useful

fathom bramble
#

if this helps

topaz mortar
#

is your script on the UIManager gameobject?

fathom bramble
#

Yep

topaz mortar
#

show it pls

fathom bramble
#

the UIManager then has a reference to the Text object

topaz mortar
#

Typo?
I see UIManager and UI Manager

#

not sure if it's just unity messing it up

fathom bramble
#

Nah that's just Unity that adds spaces

topaz mortar
#

any errors in console?

outer hamlet
#

anyone meets this problem?

topaz mortar
#

ah lol

topaz mortar
summer stump
#

Prefabs are like blueprints (I know I used that that analogy already). Your blueprint cannot mention "the house two doors down", because it may be built in a different city

#

You will need to instantiate, store that reference the method returns, and the inject the reference where needed

#

This is a staple in pure c# where you will use di a lot more in Main

#

Enemy newEnemy = Instantiate(prefab)
newEnemy.Initialize(UiManager)

#

You could also just make UIManager a singleton.
UIManager.Instance

#

This is all mentioned in the link i sent twice before

fathom bramble
#

Ew that's the unity way to do it? god that's ugly but okay

#

I'll try it

summer stump
#

The small inconsequential difference being that you would generally do it in a constructor

#

But calling that different would be wild

topaz mortar
#

I got very confused with references on prefabs at some point too

versed forge
#

hello everyone I am new to unity and was planning on making a game with a friend so we joined the UCVS and i was messing with the branches and made /main/test/ and /main/test/m and wanted to move /m back into the /main/test and then back into /main, when moving i was told i could only ove into empy branches and when trying the merge it made that weird loop and was wanintng to know if there was a may to move or merge it wihtout the weird loop. I accidentally separated the setting from the root and was wanting to put them back while also learning this for future refence. I am new to the git stuff.

fathom bramble
#

just one line

#

done

topaz mortar
summer stump
#

If you wanted to call it from inside an object in C#, you would have to do it similar to how I showed above of course. You could not just call UIManager.GameOver without injecting the reference to UIManager

#

But as I said multiple times.... singletons are explained in the link I sent

summer stump
# fathom bramble Then it's definitely not how I've ever done it in any game. My general way is `...

The thing that may be causing confusion is that in c#, you have access to Main()
You set up all the references there. You pass everything in as needed or are just IN the same scope as the references you created. But in Unity (and Bevy, Godot, Unreal, and every big game engine I know of), you do NOT have access to Main. The engine consumes it, and calls things for you.
You have to understand that fundamental fact to proceed.

fathom bramble
#

Christ I finally fixed it. I appreciate all the help @summer stump @topaz mortar. All I ended up doing was ripping out a pub-sub system I wrote in another C# game and I put it in here

#

no need for references, everything communicates through a common messagebus now

topaz mortar
#

yeah this looks much simpler than adding a simple reference ๐Ÿค”
but I guess you know what you're doing

summer stump
#

Certainly one way to do it ๐Ÿคทโ€โ™‚๏ธ

fathom bramble
#

@summer stump @topaz mortar I seriously do still appreciate the help you provided. If you guys were curious, this is the game so far

#

I'll uh..have to make the brightness on those bursts less..hurt my eyes

summer stump
#

Nice. And no problem. Good luck with it all!

topaz mortar
loud mango
#
 
void ShootBullet(){
        if(isCoolDownAvailable == true){
            GameObject bullet = PlayerBullet.instance.GetPoolObjects();
            if(bullet != null){
                bullet.transform.position = muzzlePoint.transform.position;
                bullet.SetActive(true);
                if(playerTransform.rotation.y == -180){
                    bullet.GetComponent<Rigidbody2D>().velocity = Vector2.right * -bulletSpeed;
                }
                if(playerTransform.rotation.y == 0){
                    bullet.GetComponent<Rigidbody2D>().velocity = Vector2.right * bulletSpeed;
                }
                DoMuzzleFlash(); 
            }

            StartCoroutine(StartCoolDown());
        }
    }```

Please help, the bullet isnt going left. angle -180 is when my player has turned left
rich adder
loud mango
#

why would it matter? its just using the value to check if the player is facing left or right

#

i used a different method, retrieving direct information from the joystick but it still has the same problem

rich adder
#

why ? because 180 is nonesense

#

quaternion max value is 1

loud mango
meager gust
#

this is the natural XYZ rotation you're used to.

#

transform.rotation represents a quaternion, which is a complex 4d rotation

loud mango
#

oo

rich adder
#

yes what you see in the inspector is Euler angles

loud mango
#

still doesnt work

#

the same problem

#

it just doesnt move

rich adder
loud mango
#
                    Debug.Log("Before Push");
                    bullet.GetComponent<Rigidbody2D>().velocity = Vector2.left * bulletSpeed;
                    Debug.Log("After push");
                }``` i did this to log
#

Before push isnt coming

#

but the bullet still spawns

rich adder
loud mango
#

says 0 when right and 180 when left

#

but if i check in the editor, its says -180 when left

rich adder
#

only whats in the code matters

#

you could absolute the value but usually its always 180

loud mango
#

then why would it change in the editor?

rich adder
#

the editor can keep going past -180 for example

loud mango
#

works now, thanks

#

also

#

if i add a light compnent to the enemy bullet, would it be performance heavy? or just adding some post processing is better

eternal needle
#

Honestly I'd stay away from checking the angles like this, at some point in your code you set the rotation. You could at the same time, declare that its facing left or right with a bool

loud mango
#

i just want it to feel like a laser

loud mango
eternal needle
#

๐Ÿคทโ€โ™‚๏ธ if the code was correct then itd work. Not really much for me to say there

loud mango
#

yeh you are right

jagged socket
#

can anyone help me in a unity input reblinding menu problem?

steep walrus
#

im following a tutorial and whenever this guy runs his code it opens up int the console cause its a console app but when i run my code it just opens in the terminal tab within vs cdoe

rich adder
#

also it makes no difference between the two, vscode integrates the terminal in the editor.

somber herald
#

If I have a script with a function like this:

void Jump()
{
    // If not grounded just quit
    if(Grounded == false)
        return;
    if (Input.GetKeyDown(KeyCode.Space))
    {
        rb.velocity += transform.up * jumpPower;
    }
}

I need to hook up my animator to this so I want to detect for a spacebar input on another script as well, will it trigger both input scripts or is it a race?

eternal needle
queen adder
#

Hey how do I fix this please. I'm new to interfaces.
To my knowledge I think this says that the interface is not public but I wrote "public interface" so I have no idea.

languid spire
#

and, of course, because you have not implemented public selected

#

I always find it easier, when implementing interfaces to let the ide do so using Quick Actions

queen adder
languid spire
#

that has nothing to do with the interface. WeaponObj is null

queen adder
#

Oh. do I set it to an object? I pretty much want the interface to be global through out all the scripts that I can use any time as a preset

languid spire
#

that is the point of Interfaces but, of course, they do need a specific instance of an object to work on

topaz mortar
#

So I have a Spellbook GO that contains spells with a Spell script on them
I made a copy of it with Instantiate(SpellbookGO), so I can show a smaller version while in combat to show the active spell
But for some reason that removed my Scriptable Object references the Spells have?

#

Not sure how it can even throw an error?

            {
                if (spell.SpellSO.Description != null && spell.SpellSO.Description != "")
                {
                    fullItemDescription += spell.SpellSO.Description + "\n\n";
                }```
195 is this line: `if (spell.SpellSO.Description != null && spell.SpellSO.Description != "")`
#

so somehow it doesn't copy the SpellSO field/reference dunno what to call it

#

This is how I copied the GameObject

{
    combatSpellBook = Instantiate(spellbook, combatSpellBookTransform);

    // Loop through all spells
    for (int i = 0; i < combatSpellBook.transform.childCount; i++)
    {
        GameObject spell = combatSpellBook.transform.GetChild(i).gameObject;
        spell.GetComponent<Image>().color = new Color(1f, 1f, 1f, 0.4f);
    }
}```
languid spire
#

we are missing a lot of context here like the inspector of spellbook and the contents of the Spell component on it

topaz mortar
#

yeah I know, but the version I'm Instantiating from* works, so not sure what more I need to provide

jagged socket
topaz mortar
#

!code

eternal falconBOT
topaz mortar
jagged socket
jagged socket
#

one sec

topaz mortar
#
        {
            combatSpellBook = Instantiate(spellbook, combatSpellBookTransform);

            // Loop through all spells
            for (int i = 0; i < combatSpellBook.transform.childCount; i++)
            {
                Spell spell = combatSpellBook.transform.GetChild(i).GetComponentInChildren<Spell>();
                Debug.Log(spell);
                Debug.Log(spell.name);
                Debug.Log(spell.SpellSO);
                Debug.Log(spell.SpellSO.Description);
            }
        }```
#

so for some reason it doesn't copy the spell.SpellSO from the original gameobject?

jagged socket
#

i`m using this to make a menu to rebind controls

topaz mortar
#

and yes I am certain the original has it because I can see the description in SpellSO when I hover it ๐Ÿ™‚

jagged socket
#

and this

#

the problem that i have to set the action in here in play mode or it won`t work

#

i have to change the action and the blinding in play mode or the blinding won`t work

#

can anyone help me it`s the second day with the problem

topaz mortar
#

So Instantiate doesn't seem to copy the fields in the scripts attached to the gameobject you're copying (in this case)
Any way around that?

topaz mortar
#

not talking about your issue ๐Ÿ˜‰

jagged socket
#

you made me sad ๐Ÿ˜”

teal viper
topaz mortar
#

The original works, it's just a field SpellSO that contains a reference to my scriptableobject, which I'm 100% sure works, because I can see the description when hovering the original spell
The issue is, I'm copying my spelbook gameobject in my scene with combatSpellbook = Instantiate(spellbook)
And the Instantiate is not copying the values of my Spells script on my spell objects in my spellbook, it's just giving me empty Spell scripts

ivory bobcat
topaz mortar
#

but I've debugged it and it showed me the Spell I'm expecting, but all the fields on it are empty

languid spire
ivory bobcat
#

Can you log prior to instantiate for verification?

#

Log prior to instantiate

topaz mortar
#

Oops it's actually this one:

topaz mortar
#
            combatSpellBook = Instantiate(spellbook, combatSpellBookTransform);
            Debug.Log(combatSpellBook.transform.GetChild(0).gameObject.GetComponentInChildren<Spell>().SpellSO.Description);```
languid spire
topaz mortar
#

no, there's a Spell script and a SpellSO reference on it

languid spire
topaz mortar
#

it's not exposed to the inspector

#
    {

        private SpellSO _spellSO;

        public SpellSO SpellSO { get => _spellSO; set => _spellSO = value; }```
languid spire
#

if it's not serialized it wont be copied with instantiate

topaz mortar
#

ugh

#
        private SpellSO _spellSO;

        public SpellSO SpellSO { get => _spellSO; set => _spellSO = value; }```
#

thank you ๐Ÿ™‚

somber herald
#

the full code is too big but lmk if you need it i can send it on pastebin but this is it

 void Jump()
 {
     // If not grounded just quit
     if(Grounded == false)
         return;
     // If cooldown not met, quit
     if (Time.time < timer + jumpCooldownTime)
         return;
     if (Input.GetAxisRaw("Jump") != 0)
     {
         timer = Time.time;
         rb.velocity += transform.up * jumpPower;
         AnimationManager.instance.JumpAnimation();
     }
 }
#

It doesnt make any sense to me that the rigidbody velocity code wont trigger but the animation will??

topaz mortar
somber herald
#

wait is it bc of fixedupdate....

#

ohhh interesting okay

#

ill try that

ivory bobcat
somber herald
topaz mortar
#

how did you miss that? ๐Ÿ˜‡

somber herald
#

WHA

#

omg you're right

#

theres even a velocity bounce for a milisecond

bright wind
#

Is there any way to check an objects order in its layer?

#

been googling it can't find a solution

#

I want to be able to check all game objects in range and select the one with the highest layer order

muted narwhal
#
var mousePosition = Mouse.current.position.ReadValue();

_itemRectTransform.anchoredPosition = mousePosition;

My mouse position, let's say at the center of the screen. But the actual GO is... outside of the canvas. Anyone know why?

ivory bobcat
bright wind
ivory bobcat
bright wind
#

but the selection is based off of the layermask

muted narwhal
topaz mortar
#

they're not the same thing somehow

polar kraken
#

Hey guys,
TerrainData doesn't support YAML MERGE ? It must be handled by Git LFS to avoid corrupting ?

teal viper
#

Typically unity assets(and assets in general) are not very tolerant to merging. It's better to avoid it.

polar kraken
muted narwhal
teal viper
topaz mortar
#

not sure if that helps or is even relevant

#

but since no one else answered ๐Ÿ™‚

muted narwhal
#

tried this already

topaz mortar
muted narwhal
#

because I tried and it didn't worked so I swapped to my original code?

#

it's kinda overcomplicated imo

polar kraken
muted narwhal
#

alright, let me try again then

teal viper
polar kraken
teal viper
# polar kraken Yup

Well, it's the first time I hear about that feature, so not sure I can answer that question.

cedar bone
#

Anyone know why my player's gizmo thing is not at the actual position of my player?

        if(Input.GetButtonDown("PickUp") && heldWeapon == null && Physics.Raycast(cam.transform.position, cam.transform.forward, out hit, 10f, LayerMask.GetMask("Item"))) {
            PickUp();
        }
    }
    private void Movement()
    {
        rb.AddForce(Vector3.down * 5, ForceMode.Force);
        // calculate move direction
        moveDirection = transform.forward * verticallInput + transform.right * horizontalInput;
        if(grounded)
        {
            rb.AddForce(moveDirection.normalized * moveSpeed * 10f, ForceMode.Force);
        }
        else if(!grounded)
        {
            rb.drag = 0f;
            rb.AddForce(moveDirection.normalized * moveSpeed * 10f * airMultiplier, ForceMode.Force);
        }
    }
...
void PickUp()
    {

        Debug.DrawRay(cam.transform.position, cam.transform.forward*200, Color.red);
        heldWeapon = hit.transform.gameObject;
        heldWeapon.transform.parent = weaponHolder.transform;
        heldWeapon.transform.gameObject.layer = LayerMask.NameToLayer("Weapon");
        heldWeapon.GetComponent<Rigidbody>().useGravity = false;
        heldWeapon.GetComponent<Rigidbody>().isKinematic = true;
        heldWeapon.transform.localPosition = Vector3.zero;
        heldWeapon.transform.localEulerAngles = new Vector3(0, 0, 0);
        heldWeapon.GetComponent<Collider>().enabled = false;
    }   
hexed terrace
#
  • You've got it set to center, not pivot
  • It's not clear which game object the cylinder is on, if it's not the selected game object, then it's position is probably not 0,0,0
cedar bone
#

Thank You!! The first point fixed it

#

is it set to pivot by default?

queen adder
#

I've got OnCollisionEnter running inside my script

void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.tag == "Breakable")
        {
            BreakObject(collision.gameObject);
        }
    }```
But if it hits anything that has the tag "Breakable" nothing happens, anyone know why? (BreakObject) prints "Broke An Object!"
#

It's got a convex mesh collider, I've tried with and without istrigger.

languid spire
queen adder
#

Even if I'd just do console.log in the void oncollisionenter, it didn't display anything either. So I'm just switching to using a raycast

languid spire
#

console.log ??

queen adder
#

Yeah?

languid spire
#

does not exist

queen adder
#

Er sorry I meant debug.log

#

Even if I did debug.log it wouldn't print anything in the console

languid spire
#

so the collision is not happening at all

queen adder
#

Apparently

languid spire
#

screenshot the collider that has this script

queen adder
#

I've tried without and with is trigger

languid spire
#

so thats a trigger not a collision, you are using the wrong method

queen adder
#

I've tried both

#

What method would it be for specifically is trigger

languid spire
#

OnTriggerEnter of course

#

so who has the Rigidbody?

queen adder
#

Nothing has a rigidbody

languid spire
#

no RigidBody, no collision event

queen adder
#

?? You can't work off of just a collider

#

Do I need to make my crowbar or cube a rigidbody? Or both?

languid spire
#

read the docs, they are VERY clear