Forum begins after the advertisement:
-
::Took me a bit, but i found the issue,
Simply set your Mana Orbs parent object to Active. Orbs 1-3 can be kept inactive:
View post on imgur.com
This should work.
::Thank you very much, it works now!!!
::and now there have another question, my heartShards can works in the game but when I save the game and out of the game and in again, the heartShards doesn’t update
::Ah, this is due an intentional error. We did not include code for checking the player’s max health when creating the series, thus, on every reload, it will default to the set max health of [5] in the inspector.
To solve this issue, simply go to your SaveData.cs:
//player stuff
public int playerMaxHealth;
public void SavePlayerData()
{
using (BinaryWriter writer = new BinaryWriter(File.OpenWrite(Application.persistentDataPath + "/save.player.data")))
{
playerMaxHealth = PlayerController.Instance.maxHealth;
writer.Write(playerMaxHealth);
}
}
public void LoadPlayerData()
{
if (File.Exists(Application.persistentDataPath + "/save.player.data"))
{
using (BinaryReader reader = new BinaryReader(File.OpenRead(Application.persistentDataPath + "/save.player.data")))
{
playerMaxHealth = reader.ReadInt32();
}
}
}
::okok thank you very much, it works now!!!
Advertisement below: