Exemplo n.º 1
0
 protected AbstractMaterialExporter(Urho3DEngine engine)
 {
     if (engine == null)
     {
         throw new ArgumentNullException(nameof(engine));
     }
     Engine = engine;
 }
Exemplo n.º 2
0
 public TransitionJson(AnimatorStateTransition transition, Urho3DEngine engine, PrefabContext prefabContext)
 {
     this.destinationState = engine.DecorateName(transition.destinationState.name);
     this.duration         = transition.duration;
     // this.hasFixedDuration = transition.hasFixedDuration;
     // this.canTransitionToSelf = transition.canTransitionToSelf;
     // this.exitTime = transition.exitTime;
     // this.hasExitTime = transition.hasExitTime;
     // this.offset = transition.offset;
     // this.orderedInterruption = transition.orderedInterruption;
     this.conditions = transition.conditions.Select(_ => new ConditionJson(_, engine, prefabContext)).ToArray();
     // this.isExit = transition.isExit;
     // this.mute = transition.mute;
     // this.solo = transition.solo;
 }
Exemplo n.º 3
0
            public ChildMotionJson(ChildMotion childMotion, Urho3DEngine engine, PrefabContext prefabContext)
            {
                this.cycleOffset = childMotion.cycleOffset;
                var motion = childMotion.motion;

                if (motion is AnimationClip animationClip)
                {
                    this.animationClip = engine.EvaluateAnimationName(animationClip, prefabContext);
                    engine.ScheduleAssetExport(animationClip, prefabContext);
                }
                else if (motion is BlendTree blendTree)
                {
                    this.hasBlendTree = true;
                    this.blendTree    = new BlendTreeJson(blendTree, engine, prefabContext);
                }
            }
Exemplo n.º 4
0
 public MaterialExporter(Urho3DEngine engine)
 {
     _engine                 = engine;
     _defaultExporter        = new LegacyMaterialExporter(_engine);
     _skyboxMaterialExporter = new SkyboxMaterialExporter(_engine);
     _exporters              = new IUrho3DMaterialExporter[]
     {
         _defaultExporter,
         new StandardMaterialExporter(_engine),
         new StandardSpecularMaterialExporter(_engine),
         new WaterMaterialExporter(_engine),
         _skyboxMaterialExporter,
         new VegetationMaterialExporter(_engine),
         new HDRPMaterialExporter(_engine)
     }.OrderByDescending(_ => _.ExporterPriority).ToList();
 }
Exemplo n.º 5
0
 public BlendTreeJson(BlendTree blendTree, Urho3DEngine engine, PrefabContext prefabContext)
 {
     this.name                   = engine.DecorateName(blendTree.name);
     this.blendParameter         = blendTree.blendParameter;
     this.blendParameterY        = blendTree.blendParameterY;
     this.blendType              = blendTree.blendType;
     this.maxThreshold           = blendTree.maxThreshold;
     this.minThreshold           = blendTree.minThreshold;
     this.useAutomaticThresholds = blendTree.useAutomaticThresholds;
     this.apparentSpeed          = blendTree.apparentSpeed;
     this.averageAngularSpeed    = blendTree.averageAngularSpeed;
     this.averageDuration        = blendTree.averageDuration;
     this.averageSpeed           = blendTree.averageSpeed;
     this.isHumanMotion          = blendTree.isHumanMotion;
     this.isLooping              = blendTree.isLooping;
     this.legacy                 = blendTree.legacy;
     this.children               = blendTree.children.Select(_ => new ChildMotionJson(_, engine, prefabContext)).ToArray();
 }
Exemplo n.º 6
0
            public StateJson(AnimatorState state, Urho3DEngine engine, PrefabContext prefabContext)
            {
                this.name = engine.DecorateName(state.name);
                // this.speed = state.speed;
                // this.cycleOffset = state.cycleOffset;
                var motion = state.motion;

                if (motion is AnimationClip animationClip)
                {
                    // this.animationClip = engine.EvaluateAnimationName(animationClip, prefabContext);
                    engine.ScheduleAssetExport(animationClip, prefabContext);
                }
                else if (motion is BlendTree blendTree)
                {
                    // this.hasBlendTree = true;
                    // this.blendTree = new BlendTreeJson(blendTree, engine, prefabContext);
                }

                transitions = state.transitions.Select(_ => new TransitionJson(_, engine, prefabContext)).ToArray();
            }
Exemplo n.º 7
0
 public PrefabExporter(Urho3DEngine engine) : base(engine)
 {
 }
Exemplo n.º 8
0
 public LayerJson(AnimatorControllerLayer layer, string name, int index, Urho3DEngine engine, PrefabContext prefabContext)
 {
     stateMachine = ExportUtils.ReplaceExtension(name, $".SM{index}.json");
 }
Exemplo n.º 9
0
 public ControllerJson(AnimatorController animationController, string assetName, Urho3DEngine engine, PrefabContext prefabContext)
 {
     this.name = engine.DecorateName(animationController.name);
     layers    = animationController.layers.Select((_, index) => new LayerJson(_, assetName, index, engine, prefabContext)).ToArray();
 }
Exemplo n.º 10
0
 public AudioExporter(Urho3DEngine engine)
 {
     _engine = engine;
 }
Exemplo n.º 11
0
 public HDRPMaterialExporter(Urho3DEngine engine) : base(engine)
 {
 }
Exemplo n.º 12
0
 public CubemapExporter(Urho3DEngine engine)
 {
     _engine = engine;
 }
Exemplo n.º 13
0
 public TextureExporter(Urho3DEngine engine)
 {
     _engine = engine;
 }
Exemplo n.º 14
0
 public BaseNodeExporter(Urho3DEngine engine)
 {
     _engine = engine;
 }
 public VegetationMaterialExporter(Urho3DEngine engine) : base(engine)
 {
 }
Exemplo n.º 16
0
 public AnimationExporter(Urho3DEngine engine)
 {
     _engine = engine;
 }
Exemplo n.º 17
0
 public SceneExporter(Urho3DEngine engine) : base(engine)
 {
 }
Exemplo n.º 18
0
 public AnimationControllerExporter(Urho3DEngine engine)
 {
     _engine = engine;
 }
Exemplo n.º 19
0
 public MeshExporter(Urho3DEngine engine)
 {
     _engine = engine;
 }
Exemplo n.º 20
0
 public TerrainExporter(Urho3DEngine engine)
 {
     _engine = engine;
 }
Exemplo n.º 21
0
            // [SerializeField] public float threshold;

            public ConditionJson(AnimatorCondition animatorCondition, Urho3DEngine engine, PrefabContext prefabContext)
            {
                this.mode      = animatorCondition.mode;
                this.parameter = animatorCondition.parameter;
                // this.threshold = animatorCondition.threshold;
            }
Exemplo n.º 22
0
 public StandardMaterialExporter(Urho3DEngine engine) : base(engine)
 {
 }
Exemplo n.º 23
0
 public StateMachineJson(AnimatorStateMachine stateMachine, Urho3DEngine engine, PrefabContext prefabContext)
 {
     this.defaultState        = engine.DecorateName(stateMachine.defaultState?.name);
     this.anyStateTransitions = stateMachine.anyStateTransitions.Select(_ => new TransitionJson(_, engine, prefabContext)).ToArray();
     states = stateMachine.states.Select(_ => new StateJson(_.state, engine, prefabContext)).ToArray();
 }
Exemplo n.º 24
0
 public LegacyMaterialExporter(Urho3DEngine engine) : base(engine)
 {
 }
Exemplo n.º 25
0
 public SkyboxMaterialExporter(Urho3DEngine engine) : base(engine)
 {
 }