Forum rules - please read before posting.

linkedPrefab problem

edited November 2016 in Technical Q&A
(Version1.54c Unity 5.4.2f2)

I assigned my prefab to linkedPrefab within AC's Inventory Manager inspector.
I tryed to refer it through my custom script below.

 Gameobject LinkedPrefab = AC.KickStarter.runtimeInventory.selectedItem.linkedPrefab;

But this code return null.

I estimated this problem is coming from constructor of "InvItem.cs".

So I added the following code to the constructor,It worked fine and I was successful in accessing linkedPrefab through my code.

 linkedPrefab = assetItem.linkedPrefab;

I'd like to confirm that my method is correct.

Thank you.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.