2D Toolkit > Releases

2D Toolkit 2.5.6

<< < (2/2)

baconbanditgames:

--- Quote from: KronusGT on February 20, 2016, 09:18:46 pm ---I'm getting a warning in Unity 5.3.1 (EDIT: 5.3.2f1 as well) and 2D Toolkit 2.5.6.

DontDestroyOnLoad only work for root GameObjects or components on root GameObjects.
UnityEngine.Object:DontDestroyOnLoad(Object)

Double clicking the warning sends me here:


--- Code: ---public static tk2dSystem inst
{
get
{
if (_inst == null)
{
// Attempt to load the global instance and create one if it doesn't exist
_inst = Resources.Load(assetName, typeof(tk2dSystem)) as tk2dSystem;
if (_inst == null)
{
_inst = ScriptableObject.CreateInstance<tk2dSystem>();
}
// We don't want to destroy this throughout the lifetime of the game
DontDestroyOnLoad(_inst); //<--- This generates the warning!
}
return _inst;
}
}

--- End code ---

Line 52 of tk2dSystem.cs

--- End quote ---

I'm getting the same warning. It happens on older versions of tk2d in Unity 5.3 and newer too.

unikronsoftware:
Hi,
Thats safe to ignore, won't cause any issues. Will remove the offending line in the next release.

wuhaishengxxx:
How can i download it?

unikronsoftware:
You'll need to register on the forum using your invoice number.

Navigation

[0] Message Index

[*] Previous page

Go to full version