Table of Contents

Class GameDataManager

Namespace
VoxelPlayground.Gaming
Assembly
GamePlay.dll
public class GameDataManager : Singleton<GameDataManager>
Inheritance
object
GameDataManager
Inherited Members
Extension Methods

Fields

achievementDataConfig

[SerializeField]
public AchievementDatas achievementDataConfig

Field Value

AchievementDatas

achievementSaveDic

public Dictionary<string, AchievementSaveData> achievementSaveDic

Field Value

Dictionary<string, AchievementSaveData>

avatars

public AvatarRegistry avatars

Field Value

AvatarRegistry

avatarStandardSkeleton

public Transform avatarStandardSkeleton

Field Value

Transform

blueprints

User-saved blueprints list

public List<BlueprintData> blueprints

Field Value

List<BlueprintData>

BuildingCraftingRecipes

public CraftingRecipes BuildingCraftingRecipes

Field Value

CraftingRecipes

characterConfig

[SerializeField]
public CharacterDatas characterConfig

Field Value

CharacterDatas

CharacterHitAnimationTable_Damage

public CharacterHitAnimationLookupTable CharacterHitAnimationTable_Damage

Field Value

CharacterHitAnimationLookupTable

CharacterHitAnimationTable_Death

public CharacterHitAnimationLookupTable CharacterHitAnimationTable_Death

Field Value

CharacterHitAnimationLookupTable

DefaultPlayer

public EquipmentsData DefaultPlayer

Field Value

EquipmentsData

itemDataConfig

public ItemDatas itemDataConfig

Field Value

ItemDatas

levelSaveDic

public Dictionary<string, LevelSaveData> levelSaveDic

Field Value

Dictionary<string, LevelSaveData>

levelSceneDataConfig

[SerializeField]
public VoxelSceneDatas levelSceneDataConfig

Field Value

VoxelSceneDatas

ModAvatars

public List<ItemData> ModAvatars

Field Value

List<ItemData>

ModCharacterDatas

public List<CharacterData> ModCharacterDatas

Field Value

List<CharacterData>

ModItemDatas

public List<ItemDataList> ModItemDatas

Field Value

List<ItemDataList>

ModSceneDatas

public List<VoxelSceneData> ModSceneDatas

Field Value

List<VoxelSceneData>

OnGameDataLoaded

public static UnityAction OnGameDataLoaded

Field Value

UnityAction

OnGameDataSaved

public static UnityAction OnGameDataSaved

Field Value

UnityAction

sandboxSceneDataConfig

[SerializeField]
public VoxelSceneDatas sandboxSceneDataConfig

Field Value

VoxelSceneDatas

sceneTipsConfig

[SerializeField]
public VoxelSceneTipsDatas sceneTipsConfig

Field Value

VoxelSceneTipsDatas

settings

public Dictionary<string, float> settings

Field Value

Dictionary<string, float>

statisticsAllTime

public StatisticsData statisticsAllTime

Field Value

StatisticsData

statisticsOneTime

public StatisticsData statisticsOneTime

Field Value

StatisticsData

voxelMaterials

public Material[] voxelMaterials

Field Value

Material[]

WeaponCraftingRecipes

public CraftingRecipes WeaponCraftingRecipes

Field Value

CraftingRecipes

Properties

BlueprintsFolder

Directory for storing blueprint JSON files

public string BlueprintsFolder { get; }

Property Value

string

Methods

AddPreloadedAsset(string, Object)

public static void AddPreloadedAsset(string path, Object obj)

Parameters

path string
obj Object

Awake()

protected override void Awake()

ClearCache()

public static void ClearCache()

DeleteBlueprint(string)

Delete a blueprint by name

public void DeleteBlueprint(string blueprintName)

Parameters

blueprintName string

GetAchievementList()

public List<AchievementData> GetAchievementList()

Returns

List<AchievementData>

GetCharacterList()

public List<CharacterData> GetCharacterList()

Returns

List<CharacterData>

GetKeyByPrefab(GameObject)

public static string GetKeyByPrefab(GameObject prefab)

Parameters

prefab GameObject

Returns

string

GetLevelSceneList()

public List<VoxelSceneData> GetLevelSceneList()

Returns

List<VoxelSceneData>

GetSandboxSceneList()

public List<VoxelSceneData> GetSandboxSceneList()

Returns

List<VoxelSceneData>

GetSetting(string, float)

public float GetSetting(string settingName, float defaultV = 1)

Parameters

settingName string
defaultV float

Returns

float

GetSettingAsBool(string)

public bool GetSettingAsBool(string settingName)

Parameters

settingName string

Returns

bool

InjectVoxelMaterials(VoxelVolume, bool)

Inject voxel materials to marching cube.

public void InjectVoxelMaterials(VoxelVolume volume, bool preferStatic = false)

Parameters

volume VoxelVolume
preferStatic bool

if perferStatic, we use VoxelPBR_Simple, which receive directionlight shadow. Otherwise do not receive directionalight shadow since shadow does not update very often

IsAchievementUnlocked(string)

public bool IsAchievementUnlocked(string achievementName)

Parameters

achievementName string

Returns

bool

IsLoaded(string)

public static bool IsLoaded(string path)

Parameters

path string

Returns

bool

Load()

public void Load()

Load(string, bool)

public static Object Load(string path, bool cacheIntoLibrary = true)

Parameters

path string
cacheIntoLibrary bool

Returns

Object

LoadAllBlueprints()

Load all blueprints from the Blueprints directory

public void LoadAllBlueprints()

LoadAsync(string, Action<Object>, bool)

public static void LoadAsync(string path, Action<Object> callBack, bool cacheIntoLibrary = true)

Parameters

path string
callBack Action<Object>
cacheIntoLibrary bool

LoadAsync<T>(string, Action<T>, bool)

public static void LoadAsync<T>(string path, Action<T> callBack, bool cacheIntoLibrary = true) where T : Object

Parameters

path string
callBack Action<T>
cacheIntoLibrary bool

Type Parameters

T

Preload(string)

public static void Preload(string path)

Parameters

path string

RemoveCache(string)

public static void RemoveCache(string path)

Parameters

path string

Save()

public void Save()

SaveBlueprint(BlueprintData, string)

Save a blueprint from connected entities

public void SaveBlueprint(BlueprintData blueprintData, string name)

Parameters

blueprintData BlueprintData
name string

SetSetting(string, float)

public void SetSetting(string settingName, float v)

Parameters

settingName string
v float

SetSettingAsBool(string, bool)

public void SetSettingAsBool(string settingName, bool val)

Parameters

settingName string
val bool

UnlockAchievement(string)

public void UnlockAchievement(string achievementName)

Parameters

achievementName string