#[Resolved] Mod Hook GameObject Visibility

26 messages · Page 1 of 1 (latest)

minor maple
#

How would I use a mod hook to hide a gameobject? I tried MeshRenderer.enabled with both a true and false state on a Binary Random Component to no effect. Also tried GameObject.SetActive - is this maybe a Binary Random Component issue or am I just incompetent?

#

Oh and Unity 2020.3.38f1, in a masterbundle, gameobject is a child of a building that uses a Material Palette (Both use the same material)

#

I also tried changing the mesh using the mod hook to see if that'd work to no avail

pastel vine
#

Is it interaction or you want hide and appear with time

#

What is ur object?

#

I mean a gameobject can be a door an item or idk so ya :’)

#

Give all the details if you need help

unique grove
#

Hmm the thing you tried should work

#

I've heard about the binary random component to be unreliable

heavy sage
#

I've heard about it being unreliable as well

minor maple
#

Hierarchy, Object Prefab, Model_0 (Main house), Aerial_0

#

Oh and the mesh renderer on Aerial_0 being turned off was another thing I messed around with

dark vale
#

You have an event hook that activates it or no

#

Binary random needs an activator

minor maple
#

good point, I completely forgot

#

not used to binary random in my brain

#

do you reckon I could make it delete the Aerial GameObject to avoid the tiny overhead of having a disabled object in memory?

unique grove
#

i dont think it matters that much and i dont know of a way to do so

minor maple
#

Yeah it is minimal impact I just want to over optimize it

#

ty for the help

#

[Resolved] Mod Hook GameObject Visibility

#

I have found another minor issue in that if I bring the object out of LOD it ceases to exist but oh well we can only ask for so much lmao