public override void OnAdd(SceneObjectBaseComponent c) { base.OnAdd(c); modelComponent = (ModelComponent)c; u3dTransComp = U3DSceneObject.GetComponent <U3DTransformComponent>(); AssetResources.LoadAsset(modelComponent.RePath, OnLoadedRes); }
private void ShowUI(object sender, EventMsg e) { var msg = e as EventThreeArgs <string, Type, object>; string uiName = msg.value1; Type t = msg.value2; object para = msg.value3; bool isLoading = false; for (int i = 0; i < _waitingForLoadView.Count; i++) { if (_waitingForLoadView[i].UiName.Equals(uiName)) { isLoading = true; break; } } if (!isLoading) { _waitingForLoadView.Add(new PendingViewInfo() { UiName = uiName, UiType = t, Param = para }); AssetResources.LoadAsset(uiName, OnLoadUI); } }
protected override void OnStart() { _guiseState = State as GuiseState; AssetResources.LoadAsset(_guiseState.Path, OnLoad); }
public override void Execute(U3DSceneObject sender, U3DSceneObject receiver, object data) { _playFxAction = this.Action as PlayFXAction; _sender = sender; AssetResources.LoadAsset(_playFxAction.FXName, OnLoadRes); }