Class GameDataManager
- Namespace
- VoxelPlayground.Gaming
- Assembly
- GamePlay.dll
public class GameDataManager : Singleton<GameDataManager>
- Inheritance
-
objectGameDataManager
- Inherited Members
- Extension Methods
Fields
achievementDataConfig
[SerializeField]
public AchievementDatas achievementDataConfig
Field Value
achievementSaveDic
public Dictionary<string, AchievementSaveData> achievementSaveDic
Field Value
- Dictionary<string, AchievementSaveData>
avatars
public AvatarRegistry avatars
Field Value
- AvatarRegistry
avatarStandardSkeleton
public Transform avatarStandardSkeleton
Field Value
blueprints
User-saved blueprints list
public List<BlueprintData> blueprints
Field Value
- List<BlueprintData>
BuildingCraftingRecipes
public CraftingRecipes BuildingCraftingRecipes
Field Value
characterConfig
[SerializeField]
public CharacterDatas characterConfig
Field Value
CharacterHitAnimationTable_Damage
public CharacterHitAnimationLookupTable CharacterHitAnimationTable_Damage
Field Value
CharacterHitAnimationTable_Death
public CharacterHitAnimationLookupTable CharacterHitAnimationTable_Death
Field Value
DefaultPlayer
public EquipmentsData DefaultPlayer
Field Value
itemDataConfig
public ItemDatas itemDataConfig
Field Value
levelSaveDic
public Dictionary<string, LevelSaveData> levelSaveDic
Field Value
- Dictionary<string, LevelSaveData>
levelSceneDataConfig
[SerializeField]
public VoxelSceneDatas levelSceneDataConfig
Field Value
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
OnGameDataSaved
public static UnityAction OnGameDataSaved
Field Value
sandboxSceneDataConfig
[SerializeField]
public VoxelSceneDatas sandboxSceneDataConfig
Field Value
sceneTipsConfig
[SerializeField]
public VoxelSceneTipsDatas sceneTipsConfig
Field Value
settings
public Dictionary<string, float> settings
Field Value
- Dictionary<string, float>
statisticsAllTime
public StatisticsData statisticsAllTime
Field Value
statisticsOneTime
public StatisticsData statisticsOneTime
Field Value
voxelMaterials
public Material[] voxelMaterials
Field Value
- Material[]
WeaponCraftingRecipes
public CraftingRecipes WeaponCraftingRecipes
Field Value
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
pathstringobjObject
Awake()
protected override void Awake()
ClearCache()
public static void ClearCache()
DeleteBlueprint(string)
Delete a blueprint by name
public void DeleteBlueprint(string blueprintName)
Parameters
blueprintNamestring
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
prefabGameObject
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
settingNamestringdefaultVfloat
Returns
- float
GetSettingAsBool(string)
public bool GetSettingAsBool(string settingName)
Parameters
settingNamestring
Returns
- bool
InjectVoxelMaterials(VoxelVolume, bool)
Inject voxel materials to marching cube.
public void InjectVoxelMaterials(VoxelVolume volume, bool preferStatic = false)
Parameters
volumeVoxelVolumepreferStaticboolif 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
achievementNamestring
Returns
- bool
IsLoaded(string)
public static bool IsLoaded(string path)
Parameters
pathstring
Returns
- bool
Load()
public void Load()
Load(string, bool)
public static Object Load(string path, bool cacheIntoLibrary = true)
Parameters
pathstringcacheIntoLibrarybool
Returns
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
pathstringcallBackAction<Object>cacheIntoLibrarybool
LoadAsync<T>(string, Action<T>, bool)
public static void LoadAsync<T>(string path, Action<T> callBack, bool cacheIntoLibrary = true) where T : Object
Parameters
pathstringcallBackAction<T>cacheIntoLibrarybool
Type Parameters
T
Preload(string)
public static void Preload(string path)
Parameters
pathstring
RemoveCache(string)
public static void RemoveCache(string path)
Parameters
pathstring
Save()
public void Save()
SaveBlueprint(BlueprintData, string)
Save a blueprint from connected entities
public void SaveBlueprint(BlueprintData blueprintData, string name)
Parameters
blueprintDataBlueprintDatanamestring
SetSetting(string, float)
public void SetSetting(string settingName, float v)
Parameters
settingNamestringvfloat
SetSettingAsBool(string, bool)
public void SetSettingAsBool(string settingName, bool val)
Parameters
settingNamestringvalbool
UnlockAchievement(string)
public void UnlockAchievement(string achievementName)
Parameters
achievementNamestring