Page 2 of 2

Re: Easy Main Menu Inventory Integration

Posted: Fri Sep 13, 2019 11:44 pm
by Tony Li
Hi,

Here's an example:

DS_EMM_Invector_Example_2019-09-13.unitypackage

Please read the _README.txt file and follow the instructions to set it up. The instruction steps are required. Otherwise the scenes will not run properly.

Then play MainMenu. Select START > NEW GAME > PLAY LEVEL to play the Invector test scene. This will load InvectorExample1.

In InvectorExample1, there is a scene portal to the left.

Image

Pick up some equipment first so you can confirm that the equipment carries to the next level. Then use the portal to SCENE 2. This will load InvectorExample2, which is an empty level with red lighting.

The _README.txt file explains how to set up your own scenes. If you have any questions, just let me know.

Re: Easy Main Menu Inventory Integration

Posted: Sat Sep 14, 2019 6:55 am
by William618
Hello,

Thank you so much! It works perfectly! With your example I could as well modify the EndScreen.cs script to make it work proprely with the Dialoag System Save System. I am happy because now I can go forward :D I will focus these days on the Dialog System and EMM. Anyway thanks again!

Re: Easy Main Menu Inventory Integration

Posted: Sat Sep 14, 2019 9:01 am
by Tony Li
Glad to help! :-)

Re: Easy Main Menu Inventory Integration

Posted: Fri Aug 14, 2020 2:38 am
by eldvbear
Have there been any updated regarding this system and the current version of the Invector inventory system? I have downloaded the example scenes in a clean template and followed the directions, but the inventory is not saving when crossing scenes. They recently did a big redesign for the inventory system and I am wondering if there may be compatibility issues with the new one.

Re: Easy Main Menu Inventory Integration

Posted: Fri Aug 14, 2020 9:53 am
by Tony Li
Hi,

What version of Invector are you using?

General things to check:

- Scripting define symbol USE_INVECTOR_INVENTORY is defined.
- The player GameObject in both scenes has an InvectorInventorySaver with the same Key value (e.g., PlayerInventory).
- Any errors or warnings in the Console window?
- The EMM-specific changes have been made.

Re: Easy Main Menu Inventory Integration

Posted: Fri Aug 14, 2020 12:48 pm
by eldvbear
Hi there,

Thank you so much for your swift response.

I went back to the README instructions to make sure that I did follow all the directions necessary.

- I am using Invector TPC 2.5.3
- I did verify that USE_INVECTOR_INVENTORY is in my scripting define symbols.
- Both of the players have an Invector Inventory Saver attached with matching key values.
- I added the line to the loading screen script just below the #if PIXELCRUSHERS_SAVESYSTEM
if (PlayerPrefs.GetInt("usingPortal") == 1)...

I am getting an error when the example figure moves from Invector Example 1 to Invector Example 2 is:

NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.InvectorSupport.InvectorInventorySaver.ApplyData (System.String s) (at Assets/Pixel Crushers/Common/Third Party Support/Invector Support/Scripts/InvectorInventorySaver.cs:111)
PixelCrushers.SaveSystem.ApplySavedGameData (PixelCrushers.SavedGameData savedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:593)
UnityEngine.Debug:LogException(Exception)
PixelCrushers.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:598)
<ApplySaveData>d__3:MoveNext() (at Assets/Dialogue System Examples/EMM Invector Example/EMMScenePortal.cs:34)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

I am sure its probably some manner of operator error, but I'm not sure what I'm missing.

I would be immensely grateful for any guidance you can provide.

Thank you,

Ernesto

Re: Easy Main Menu Inventory Integration

Posted: Fri Aug 14, 2020 1:20 pm
by Tony Li
Hi Ernesto,

This is a common issue with Invector. Try setting the Save System component's Frames To Wait Before Apply Data to 2. Also make sure you the Invector Inventory Saver's Restore State On Start checkbox is UNticked. Invector needs a frame to initialize its inventory component.

Re: Easy Main Menu Inventory Integration

Posted: Fri Aug 14, 2020 1:55 pm
by eldvbear
Tony,

It worked!

Thank you so much for your help.

I have to say, that the customer support for Pixel Crushers is outstanding.
By far some of the best that I have encountered with using Unity assets.

I will certainly be purchasing more products from your company as need arises!

Thank you again,

Ernesto

Re: Easy Main Menu Inventory Integration

Posted: Fri Aug 14, 2020 2:16 pm
by Tony Li
Hi Ernesto,

Thanks! Glad to help.