i have a pistol scene, that inherits from a base weapon class, that takes a custom resource (weapon attributes) as an export variable. when i run the game, upon trying to access any of the properties from the custom resource it errors out saying "Invalid access to property or key 'capacity' on a base object of type nil" capacity there being the first property it tried to access in the _ready function
#custom resource as export variable
11 messages · Page 1 of 1 (latest)
well heck, for those who find this after me all i needed to do was set the deafult value of the export variable to a new object of the same type
i suppose it acts like aan empty container for the resource to fill once loaded
and without it it there is nothing to fill
wait no scratch that, im just getting the new but empty object
well, update. it seems the issue isnt the export variable
its how im instantiating the scene. its not loading any of the inspector properties
instantiating through code has nothing, but dragging it into the scene tree before run time and everything works fine
is there another way im supposed to do this, or something im missing?