A prefab can’t hold a reference to a gameObject that’s within a scene. It wouldn’t make sense. What happens if the scene isn’t loaded?. Instead make a fire prefab and then you’ll be able to drag it onto the slug’s ‘On Fire’ slot. Prefabs can reference other prefabs.
Prefab values don’t change at runtime though, therefore you don’t really need to check for the bool value directly. You should already know whether it’s true or not. Still not sure what your goal is exactly that makes you want to access this script. You likely don’t need to.
A prefab wanting to know the values of a component nested inside another component doesn’t make sense, not in this context. The prefab on disk is a separate instance to any live instance in a scene, so I doubt this will work as you expect it to.
Spawned objects are totally different objects than the actual prefab. If it was possible to reference the child object of the prefab like you want to, that object’s values will never change, even if the values of any objects spawned from the prefab change at runtime. Do you want to reference a spawned object? And if so, which one? You’ll have to create logic for that. Referencing the script in the actual prefab is incorrect and won’t do what you want.
You will need to do that via code. The component on spawning prefab can reference this component, and then pass a reference to the instantiated prefab.
Yes, and I mean what you’re trying to do would only be referencing the script in the prefab.
For the functionality you really want you’ll have to do that via code when instantiating the prefab instance. Ideally a script in the prefab root object would have a reference to this child object script that you can just access. Otherwise, you can use GetComponentInChildren on the spawned prefab object.