C# 클래스 UnityRose.ResourceManager

This singleton class loads common resources into memory for quick access. Avoids having to reload certain resources that are almost always needed. For example ZSC files, every time a piece of armor is equipped or appears on another player. TODO: This class should be improved to cache most common equipment.
파일 보기 프로젝트 열기: osROSE/UnityRose 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
instance ResourceManager
stb_animation_list UnityRose.Formats.STB
stb_animation_type UnityRose.Formats.STB
stb_cap_list UnityRose.Formats.STB
stb_hair_list UnityRose.Formats.STB
stb_weapon_list UnityRose.Formats.STB
weapon_type_lookup WeaponType>.Dictionary
zmd_female UnityRose.Formats.ZMD
zmd_male UnityRose.Formats.ZMD
zsc_arms_female UnityRose.Formats.ZSC
zsc_arms_male UnityRose.Formats.ZSC
zsc_back UnityRose.Formats.ZSC
zsc_body_female UnityRose.Formats.ZSC
zsc_body_male UnityRose.Formats.ZSC
zsc_cap_female UnityRose.Formats.ZSC
zsc_cap_male UnityRose.Formats.ZSC
zsc_faceItem UnityRose.Formats.ZSC
zsc_face_female UnityRose.Formats.ZSC
zsc_face_male UnityRose.Formats.ZSC
zsc_foot_female UnityRose.Formats.ZSC
zsc_foot_male UnityRose.Formats.ZSC
zsc_hair_female UnityRose.Formats.ZSC
zsc_hair_male UnityRose.Formats.ZSC
zsc_subweapon UnityRose.Formats.ZSC
zsc_weapon UnityRose.Formats.ZSC

공개 메소드들

메소드 설명
GenerateAnimationAsset ( GenderType gender, RigType rig, String>.Dictionary zmoPaths ) : void
GenerateAnimationAsset ( GenderType gender, WeaponType weapon ) : void

Generate an animation prefab for the given gender and weapon

GenerateAnimationAssets ( ) : void

Loop through all weapon types for each gender and create an animation asset and all associated clips The animations and clips are placed in GameData/Animation

GetZMOPath ( WeaponType WeaponType, ActionType Action, GenderType Gender ) : string

Get Animation ZMO File path

LoadAnimations ( GameObject player, ZMD skeleton, WeaponType weapon, GenderType gender ) : void

Loads all animations for equiped weapon type. Used only in editor to generate prefabs

LoadClips ( GameObject skeleton, ZMD zmd, GenderType gender, RigType rig, String>.Dictionary zmoPaths ) : void
LoadClips ( GameObject skeleton, ZMD zmd, WeaponType weapon, GenderType gender ) : void

Loads all animations for given weapon type and gender. The clips are saved to Animation/{gender}/{weapon}/clips/{action}.anim Used only in editor to generate prefabs

cachedLoad ( string path ) : object

Checks the cache to see if the resource has already been loaded recently If found, returns the cached resource from memory (fast) If not found, loads the resource from file (slow) and caches the resource

getWeaponType ( int weaponID ) : WeaponType
getZSC ( GenderType gender, BodyPartType bodyPart ) : ZSC

Get the ZSC object associated with the given gender and bodyPart

loadBindPoses ( GameObject skeleton, GenderType gender, WeaponType weapon ) : BindPoses

Load bindposes and bones matrices from resources scriptable object

loadResource ( string path ) : object

Load a Rose Asset from text asset resource file to memory. Not cached.

loadSkeleton ( GenderType gender, RigType rig ) : GameObject
loadSkeleton ( GenderType gender, WeaponType weapon ) : GameObject

Load a skeleton game object from resources prefab

unloadResource ( UnityEngine resource ) : void

비공개 메소드들

메소드 설명
ResourceManager ( ) : UnityEditor
getBoneNames ( Transform transforms ) : string[]

메소드 상세

GenerateAnimationAsset() 공개 메소드

public GenerateAnimationAsset ( GenderType gender, RigType rig, String>.Dictionary zmoPaths ) : void
gender GenderType
rig RigType
zmoPaths String>.Dictionary
리턴 void

GenerateAnimationAsset() 공개 메소드

Generate an animation prefab for the given gender and weapon
public GenerateAnimationAsset ( GenderType gender, WeaponType weapon ) : void
gender GenderType
weapon WeaponType
리턴 void

GenerateAnimationAssets() 공개 메소드

Loop through all weapon types for each gender and create an animation asset and all associated clips The animations and clips are placed in GameData/Animation
public GenerateAnimationAssets ( ) : void
리턴 void

GetZMOPath() 공개 메소드

Get Animation ZMO File path
public GetZMOPath ( WeaponType WeaponType, ActionType Action, GenderType Gender ) : string
WeaponType WeaponType Equiped Weapon
Action ActionType
Gender GenderType Player Gender
리턴 string

LoadAnimations() 공개 메소드

Loads all animations for equiped weapon type. Used only in editor to generate prefabs
public LoadAnimations ( GameObject player, ZMD skeleton, WeaponType weapon, GenderType gender ) : void
player UnityEngine.GameObject
skeleton UnityRose.Formats.ZMD
weapon WeaponType
gender GenderType
리턴 void

LoadClips() 공개 메소드

public LoadClips ( GameObject skeleton, ZMD zmd, GenderType gender, RigType rig, String>.Dictionary zmoPaths ) : void
skeleton UnityEngine.GameObject
zmd UnityRose.Formats.ZMD
gender GenderType
rig RigType
zmoPaths String>.Dictionary
리턴 void

LoadClips() 공개 메소드

Loads all animations for given weapon type and gender. The clips are saved to Animation/{gender}/{weapon}/clips/{action}.anim Used only in editor to generate prefabs
public LoadClips ( GameObject skeleton, ZMD zmd, WeaponType weapon, GenderType gender ) : void
skeleton UnityEngine.GameObject
zmd UnityRose.Formats.ZMD
weapon WeaponType
gender GenderType
리턴 void

cachedLoad() 공개 메소드

Checks the cache to see if the resource has already been loaded recently If found, returns the cached resource from memory (fast) If not found, loads the resource from file (slow) and caches the resource
public cachedLoad ( string path ) : object
path string
리턴 object

getWeaponType() 공개 메소드

public getWeaponType ( int weaponID ) : WeaponType
weaponID int
리턴 WeaponType

getZSC() 공개 메소드

Get the ZSC object associated with the given gender and bodyPart
public getZSC ( GenderType gender, BodyPartType bodyPart ) : ZSC
gender GenderType
bodyPart BodyPartType
리턴 UnityRose.Formats.ZSC

loadBindPoses() 공개 메소드

Load bindposes and bones matrices from resources scriptable object
public loadBindPoses ( GameObject skeleton, GenderType gender, WeaponType weapon ) : BindPoses
skeleton UnityEngine.GameObject
gender GenderType
weapon WeaponType
리턴 BindPoses

loadResource() 공개 메소드

Load a Rose Asset from text asset resource file to memory. Not cached.
public loadResource ( string path ) : object
path string
리턴 object

loadSkeleton() 공개 메소드

public loadSkeleton ( GenderType gender, RigType rig ) : GameObject
gender GenderType
rig RigType
리턴 UnityEngine.GameObject

loadSkeleton() 공개 메소드

Load a skeleton game object from resources prefab
public loadSkeleton ( GenderType gender, WeaponType weapon ) : GameObject
gender GenderType
weapon WeaponType
리턴 UnityEngine.GameObject

unloadResource() 공개 메소드

public unloadResource ( UnityEngine resource ) : void
resource UnityEngine
리턴 void

프로퍼티 상세

instance 공개적으로 정적으로 프로퍼티

public static ResourceManager,UnityRose instance
리턴 ResourceManager

stb_animation_list 공개적으로 프로퍼티

public STB,UnityRose.Formats stb_animation_list
리턴 UnityRose.Formats.STB

stb_animation_type 공개적으로 프로퍼티

public STB,UnityRose.Formats stb_animation_type
리턴 UnityRose.Formats.STB

stb_cap_list 공개적으로 프로퍼티

public STB,UnityRose.Formats stb_cap_list
리턴 UnityRose.Formats.STB

stb_hair_list 공개적으로 프로퍼티

public STB,UnityRose.Formats stb_hair_list
리턴 UnityRose.Formats.STB

stb_weapon_list 공개적으로 프로퍼티

public STB,UnityRose.Formats stb_weapon_list
리턴 UnityRose.Formats.STB

weapon_type_lookup 공개적으로 정적으로 프로퍼티

public static Dictionary weapon_type_lookup
리턴 WeaponType>.Dictionary

zmd_female 공개적으로 프로퍼티

public ZMD,UnityRose.Formats zmd_female
리턴 UnityRose.Formats.ZMD

zmd_male 공개적으로 프로퍼티

public ZMD,UnityRose.Formats zmd_male
리턴 UnityRose.Formats.ZMD

zsc_arms_female 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_arms_female
리턴 UnityRose.Formats.ZSC

zsc_arms_male 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_arms_male
리턴 UnityRose.Formats.ZSC

zsc_back 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_back
리턴 UnityRose.Formats.ZSC

zsc_body_female 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_body_female
리턴 UnityRose.Formats.ZSC

zsc_body_male 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_body_male
리턴 UnityRose.Formats.ZSC

zsc_cap_female 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_cap_female
리턴 UnityRose.Formats.ZSC

zsc_cap_male 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_cap_male
리턴 UnityRose.Formats.ZSC

zsc_faceItem 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_faceItem
리턴 UnityRose.Formats.ZSC

zsc_face_female 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_face_female
리턴 UnityRose.Formats.ZSC

zsc_face_male 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_face_male
리턴 UnityRose.Formats.ZSC

zsc_foot_female 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_foot_female
리턴 UnityRose.Formats.ZSC

zsc_foot_male 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_foot_male
리턴 UnityRose.Formats.ZSC

zsc_hair_female 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_hair_female
리턴 UnityRose.Formats.ZSC

zsc_hair_male 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_hair_male
리턴 UnityRose.Formats.ZSC

zsc_subweapon 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_subweapon
리턴 UnityRose.Formats.ZSC

zsc_weapon 공개적으로 프로퍼티

public ZSC,UnityRose.Formats zsc_weapon
리턴 UnityRose.Formats.ZSC