hello, im trying to destroy an object after ending schematic, but it give me error as below
img
the full error is
MissingReferenceException: The object of type 'InteractionMachineComponent' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
GamingIsLove.Makinom.Components.InteractionMachineComponent.GamingIsLove.Makinom.IInteractionBehaviour.get_enabled () (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.InteractionHandler.GetFirstAvailable (GamingIsLove.Makinom.MachineTypeAsset machineType, UnityEngine.GameObject user, System.Collections.Generic.List`1[T] list, GamingIsLove.Makinom.IRange range) (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.Components.InteractionController.GetFirstAvailable (GamingIsLove.Makinom.MachineTypeAsset machineType) (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.InteractionHandler.GetFirstAvailableInteractionController (GamingIsLove.Makinom.MachineTypeAsset machineType) (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.InteractionHandler.GetFirstAvailable (GamingIsLove.Makinom.MachineTypeAsset machineType) (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.InteractionCheck.GetFirstControl () (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.InteractionCheck.GetFirst (GamingIsLove.Makinom.InteractionSource source) (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.UI.InteractionHUDInstance.IsVisible () (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.UI.HUDInstance.Tick () (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.UI.BaseUIHandler.Tick () (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.Maki.FireTick () (at <996ca35e83f140d18d4f2476ad91bad3>:0)
GamingIsLove.Makinom.MakinomHandler.Update () (at <996ca35e83f140d18d4f2476ad91bad3>:0)
here is my setting
img

i tried using machine end action to destroy but it gives me the same error
img

can you help me with what's wrong or maybe any tips how to achieve it?

thank you !
  • Seems to be related to the interaction HUD - can you post your HUD's setup?
    Did a quick test and works fine on my end, so might be based on however your HUD is set up.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited November 2023
    umm my interaction HUD?

    Ork HUD Interaction setting 1
    Ork HUD interaction Setting 2

    Interaction HUD1
    2
    3
    4
    5

    here is my interaction HUD setting. i think i still follow the 3d playground HUD setting..
    as far as i remember, after interaction i never get any HUD..
    Post edited by rmagn on
  • edited November 2023
    Hm, looks correct and is the same setup as in my project ... are you using the latest ORK version?
    I'd need a Unity test project to check this out, since it's not happening on my end.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited November 2023
    hello,
    yes im using ork ver 3.16.2 and unity 2022.3.10f1
    my problem is my project size is already 15Gb without library folder. :(

    i tried destroying the don't destroy on load object manually in the hierarchy (after start battle node and back on the field), it gives me the same error (even after it is in disabled state in the hierarchy), except it only gives me 1 error instead of endless error if i destroy it using node / interaction machine setting.
    here is the video footage of when it occurs after i delete the object manually.
    video

    other things i notice are
    1. the error happens after it changes scene from battle to field (after battle, since im changing scene for battle). if i disable the start battle node (not changing scene), it works fine.
    2. if i delete manually the object manually right before deactivate node (still on show dialogue), it doestn get error, but the schematic never gets finished .
    3. the 2 childs, battle and item collector objects, are safely destroyed by the schematic. only destroying the interaction machine caused error.
    4. i tried adding Enablecomponent node to disable InteractionMachineComponent, still same error.
    5. and since im changing back to field, there are 2 identical objects, 1 is from the scene, 1 is from dont destroy on load.

    a workaround i did was only disable the game object and it doesn't cause any error.
    but it stays as dont destroy on load object and i think i will have a lot of this start battle node used throughout the game.
    i think after saving and reload the game, the game object will go away? (assuming players won't speedrun the game so not many objects will accumulate as dont destroy on load objects.)

    Post edited by rmagn on
  • #2 is due to having Stop On Destroy enabled in your machine component's settings.
    Do you need the machine object to survive over the scene changes/battle? Otherwise I'd just try to disable Stop On Destroy, not use Don't Destroy On Load and let the regular stuff handle this.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • hello,

    erm, yes so far i need the object to exist when changing scene since the schematic is still running, else after battle the rest of the schematic won't run.

    item collect - start battle (change scene to battle, and back to field) - show dialogue - change variable - quest task finish

    is there any workaround to make it continue without using dont destroy on load?
  • The schematic can run without the machine object if the machine component has Stop On Destroy disabled.

    Did a test with a similar setup (item collector start, load scene, wait, load back, destroy) and works fine.
    I'll need a test project to look into this, so if you can e.g. recreate this happening in a simple scene in a new project or remove everything not needed for a simple test scene to be able to send your project, that'd be great :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • hello,
    apparently if i disable dont destroy on load node in the schematic, uncheck the stop on destroy with machine end action set to destroy, the schematic works just fine.

    the problem was the dont destroy on load node i was using causing the errors.
    i dont know why that was causing problem though. XD

    thank you !
  • edited December 2023
    Me neither - and worked fine on my end with dont destroy on load ...
    Might have been a Unity version difference quirk :D
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.