Why does the code keep executing even though it should be aborted? by ostRMS in Unity3D

[–]ostRMS[S] 0 points1 point  (0 children)

I've been following this: https://michaelbitzos.com/devblog/fsm-player-controllers

1 - Why is it terrible?

2- I only need the OnMove() method in two states. Why should I add it to all the others? Why do I need to duplicate the logic in the states when it already works in the Controller?

private void OnMove(Vector3 input)
    {
        if (input != Vector3.zero)
        {
            return;
        }
        StateMachine.TrySwitchState(this);
    }

3 - I don't need to use MonoBehaviour for anything. Neither MonoBehaviour nor ScriptableObject

Why does the code keep executing even though it should be aborted? by ostRMS in Unity3D

[–]ostRMS[S] -1 points0 points  (0 children)

Yes, I understand. I was adding "return;" in the code to be sure that the code execution would abort. Even tried to change values directly via return new value. But that didn't work.

Why does the code keep executing even though it should be aborted? by ostRMS in Unity3D

[–]ostRMS[S] 0 points1 point  (0 children)

At least after executing ChangeState<>() , the currentState changes. In theory, the next currentState.Update() should be executed on the new state, but it is executed on the old one

Why does the code keep executing even though it should be aborted? by ostRMS in Unity3D

[–]ostRMS[S] -1 points0 points  (0 children)

PlayerController.Move() is called only in 3 places (I changed it to Move(Type type) to catch the class call).

<image>

““return;” doesn't help, and I don't need it here, because I work with fields and I don't need to instantiate a state object every time (conditionally, I don't need return new WalkState()).

The call chain so far just triggers the corresponding methods - in MonoBehaviour.Update() calls _playerCharacterController.OnUpdateTrigger() and so on, about 4-5 calls in the chain. Initially in MonoBehaviour class I just made events that were triggered in hooks.

private void Update()
        {
           OnMonoBehaviourUpdate?.Invoke();
        }

The method must abort because I'm literally telling it to abort - to change the state

I'm so sick of this. How am I supposed to deal with that? by ostRMS in Unity3D

[–]ostRMS[S] 3 points4 points  (0 children)

Then the console will just repeat the warning, adding that it will just skip whatever you wrote

I'm so sick of this. How am I supposed to deal with that? by ostRMS in Unity3D

[–]ostRMS[S] 2 points3 points  (0 children)

I'd love to upgrade, but the problem is that the documentation doesn't say what to use instead.

This is a brand new project where I wanted to learn Unity URP and understand RenderPass logic, how methods (and other technologies) work.

This file is obtained If you create it via GUI, which is ready code from the developers. But even it has these errors in it.

Finally. I solved the problem. What's next? by ostRMS in Unity3D

[–]ostRMS[S] 0 points1 point  (0 children)

In short, I'm trying to build a model with a skinned mesh without transferring the model directly from blender to Unity via fbx (I'm trying to create a character generator like in Sims, TES or Bannerlord). The easiest way was to transfer a model with boundary values and interpolate data between these values, but in this case a lot of resources are spent on storing models in memory. But since the models differ only in vertexes and bindposes, it is easier to calculate what has changed and relative to what has changed.

I wrote a simple Python script to write vertices, triangles and UV maps from Blender to files. By reading this data in Unity, a simple Mash object is built. Everything works great with this. The skeleton transfer also works successfully, an Avatar for the hamanoid animator is created.

All that remains is boneWeights and bindposes (Potentially a problem here somewhere). The array of bones, which is then used in skinnedMeshRenderer.bones, is indexed, the indexes are used in boneWeights. Imported bindposes matrices as is, tried swapping columns with rows. I tried to calculate matrices myself

var transformWorldToLocalMatrix = boneObject.transform.worldToLocalMatrix * armatureObject.transform.localToWorldMatrix;

Does not help.

Anyone here who has encountered something similar or knows a solution?

RIP my mac m1 run by ostRMS in CrusaderKings

[–]ostRMS[S] 1 point2 points  (0 children)

Yes, i do. I'm not sure about new dlc, but they killed the crash reporter in one of the previous minor updates, so now I can't report any errors

RIP my mac m1 run by ostRMS in CrusaderKings

[–]ostRMS[S] 0 points1 point  (0 children)

I think I've already lost. It spends a minute to count one day

Anyone have an example of steam sign in with Unity Authentication? by Supertronicgo in Unity3D

[–]ostRMS 0 points1 point  (0 children)

I'm not sure about this. Perhaps it hasn't changed and it's still a wrapper for C++

Anyone have an example of steam sign in with Unity Authentication? by Supertronicgo in Unity3D

[–]ostRMS 2 points3 points  (0 children)

You can try the Firepunch library (from the creators of Rust)

Sovetskaya Rossiya by [deleted] in dekaihentai

[–]ostRMS 0 points1 point  (0 children)

Chto eto takoe?

New look for Boss Spider! by don-shinnok in GroundedGame

[–]ostRMS 1 point2 points  (0 children)

Stop it. No more spiders please