I am trying to build a shop in a 2D game and every time I interact with it, I get this error

NullReferenceException: Object reference not set to an instance of an object
ORKFramework.Shop.ShopScreen.Register () (at <7269fa06b8c047ea90de15f41f29ebac>:0)
ORKFramework.Shop.ShopScreen..ctor (ORKFramework.Events.IEventStarter starter, System.Int32 shopID, System.String shopSceneID, System.Int32 factionID) (at <7269fa06b8c047ea90de15f41f29ebac>:0)
ORKFramework.InventoryAccessHandler.OpenShop (ORKFramework.Events.IEventStarter starter, System.Int32 shopID, System.String shopSceneID, System.Int32 factionID) (at <7269fa06b8c047ea90de15f41f29ebac>:0)
ORKFramework.Behaviours.ShopInteraction.StartEvent (UnityEngine.GameObject startingObject) (at <7269fa06b8c047ea90de15f41f29ebac>:0)
ORKFramework.Behaviours.BaseInteraction.KeyPress () (at <7269fa06b8c047ea90de15f41f29ebac>:0)
ORKFramework.Behaviours.BaseInteraction.Update () (at <7269fa06b8c047ea90de15f41f29ebac>:0)

I've been through all the tutorials can't seem to find what i am missing or forgetting

  • The only way I see this error happening is when you don't have any combatant in the player's group - i.e. you don't have a player added.
    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!
  • got that problem sorted out but now when i use the shop nothing happens game just freezes, no menus open, can not exit and no errors in the console
  • Can you give some details about your shop and shop layout?
    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!
  • its the same setup from the tutorials just placed on a 2d square
  • I assume you also have the rest set up, GUI boxes, items, etc.?

    Hm, strange - which GUI system are you using, legacy (like in the tutorial) or new UI?
    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!
  • Legacy, I used all the setting in tutorials for all GUI boxes, even used the completed project to make sure i did not skip something. Right now the Area objects don't trigger on a 2d grid, shop doesn't open at all, ESC menu works until you click on one of the boxes (inventory, skills, quests)

    I tested the completed project to see if it was the version of unity I am using causing these errors, but it works without issue
  • Could you send me a small Unity test project where this happens to contact@orkframework.com?
    You can drastically reduce the size by deleting the Library folder from the Unity project. E.g. upload it to dropbox or something like that and send me the link.
    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!
  • Been a couple of weeks since I emailed you my project, any luck finding what's wrong? I still can't shops or areas to work in 2D, just about to give up.
  • Sorry about that, kinda swamped in work currently :)

    Looked into your project - the shop itself is actually working, but interacting with it is not due to your somewhat wonky setup.

    You actually use a game object in the scene, controlled via Makinom machines to move around, so that's not the ORK player (which tries to spawn, but can't due to not having a spawn point in the scene). Also, you seem to mix 2D and 3D components.
    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.