using UnityEngine;
using System.Collections.Generic;
namespace GamingIsLove.Makinom
{
[EditorSettingInfo("FBPP", "The value of a PlayerPrefs int or float variable.",
listName = "Variable/FBPP")]
public class FloatValue_FBPPType<T> : FloatValue_BaseType<T> where T : IObjectSelection, new()
{
[EditorHelp("PlayerPrefs Key", "The key (name) of the PlayerPrefs that contains the value.", "")]
[EditorInfo(isVariableField = true)]
[EditorHide]
[EditorWidth(true, hideName = true, noHorizontal = true)]
public string playerPrefsKey = "";
[EditorHelp("Is Int", "The value will be taken from an Integer PlayerPrefs (using GetInt).\n" +
"If disabled, the value will be taken from a Float PlayerPrefs (using GetFloat).", "")]
public bool isInt = false;
public FloatValue_FBPPType()
{
}
public override bool NeedsCall
{
get { return false; }
}
/*
============================================================================
Value functions
============================================================================
*/
public override float GetValue(IDataCall call)
{
if (this.isInt)
{
return FBPP.GetInt(this.playerPrefsKey);
}
else
{
return FBPP.GetFloat(this.playerPrefsKey);
}
}
/*
============================================================================
Editor functions
============================================================================
*/
public override string ToString()
{
return this.playerPrefsKey;
}
}
}
NullReferenceException: Object reference not set to an instance of an object
at GamingIsLove.Makinom.FloatValue`1[T].GetValue (GamingIsLove.Makinom.IDataCall call) [0x00001] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.ChangeVariableBase`1[T].Change (GamingIsLove.Makinom.VariableHandler handler, GamingIsLove.Makinom.IDataCall call) [0x00153] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.ChangeVariableBase`1[T].Change (GamingIsLove.Makinom.IDataCall call, System.Collections.Generic.List`1[GamingIsLove.Makinom.VariableHandler]& handlers) [0x0001e] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.ChangeVariable`1[T].Change (GamingIsLove.Makinom.IDataCall call, System.Collections.Generic.List`1[GamingIsLove.Makinom.VariableHandler]& handlers) [0x0000f] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.VariableSetter`1[T].SetVariables (GamingIsLove.Makinom.IDataCall call) [0x00017] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Nodes.ChangeVariablesNode.Execute (GamingIsLove.Makinom.Schematics.Schematic schematic) [0x00001] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Schematic.ExecuteNextNode () [0x000d9] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Schematic.NodeFinished (System.Int32 next) [0x00058] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Nodes.SteamStats.Execute (GamingIsLove.Makinom.Schematics.Schematic schematic) [0x00091] in <dde7d9e5e0bd4052b0794f95d5ec44e7>:0
at GamingIsLove.Makinom.Schematics.Schematic.ExecuteNextNode () [0x000d9] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Schematic.NodeFinished (System.Int32 next) [0x00058] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Schematic.ExecuteNextNode () [0x0010f] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Schematic.NodeFinished (System.Int32 next) [0x00058] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Nodes.StartGameNode.Execute (GamingIsLove.Makinom.Schematics.Schematic schematic) [0x00013] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Schematic.ExecuteNextNode () [0x000d9] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Schematic.NodeFinished (System.Int32 next) [0x00058] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Nodes.ChangeMusicNode.Execute (GamingIsLove.Makinom.Schematics.Schematic schematic) [0x0000d] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Schematic.ExecuteNextNode () [0x000d9] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Schematic.NodeFinished (System.Int32 next) [0x00058] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.Schematics.Schematic.Tick () [0x001d2] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.MachineHandler+MachineUpdate.Tick () [0x0006b] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at (wrapper delegate-invoke) <Module>.invoke_void()
at GamingIsLove.Makinom.Maki.FireTick () [0x0001b] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
at GamingIsLove.Makinom.MakinomHandler.Update () [0x00001] in <bd910418d8d8436c8c34d66bbb2d0dbd>:0
It looks like you're new here. If you want to get involved, click one of these buttons!
The Managed Stripping Level setting pretty much at the bottom here handles this. Set it to Disabled, or if you use IL2CPP, use Minimal to prevent Unity from stripping custom code.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
In the end, I spotted that I had mindlessly placed the script in an Editor subfolder. So you were absolutely right, the script did get excluded. After moving it, everything works perfectly now.
Thank you once again for your invaluable help.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!