public void OnLoadSucc(SoundEntity entity, UnityObject unityObject) { if (null == entity) { Logger.Error("Entity is null or not sound entity!"); return; } var go = unityObject.AsGameObject; if (null != go) { var audioSource = go.GetComponent <AudioSource>(); // go.name = entity.entityKey.ToString(); entity.AddUnityObj(audioSource, unityObject); var key = _soundPlayer.Preload(audioSource); if (!entity.hasAudioSourceKey) { entity.AddAudioSourceKey(key); } else { entity.audioSourceKey.Value = key; } if (entity.hasParent) { _soundParentController.AttachParent(entity); } } else { Logger.Error("Asset load error : null or type missmatch, GameObject needed"); } }