Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix InventoryDef.Properties causing NullReferenceException #748

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peterdwdawe
Copy link

Fixes #747

…lReferenceException, and returns properties correctly.
@KalleGH
Copy link

KalleGH commented Sep 2, 2024

Why is this not merged yet? :) I really need this to work, I cant fetch the properties of items in steam inventory and I really need that to work. Plz plz merge

@KalleGH
Copy link

KalleGH commented Sep 2, 2024

Is there any way for me to use this?

@peterdwdawe
Copy link
Author

Is there any way for me to use this?

I don't know if this repo is still active, which is probably why you arent getting any responses. This fix was pretty straightforward though. Just need to add a null check in inventorydef.cs (take a look at my commit).

I'd recommend cloning the repo and building it yourself, that was what I ended up doing. If you're using unity like me then you can just replace the old files with the new ones you just built, keeping all the old meta files, etc.

@KalleGH
Copy link

KalleGH commented Sep 4, 2024

Well, it turned out I was just doing it all wrong.
..
I was asking for: item.def.propeties
Turned out item.properties worked 100%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accessing InventoryDef.Properties throws a Null Reference Exception
2 participants