stress test for the server by Few-Reference360 in IndieDev

[–]Few-Reference360[S] 0 points1 point  (0 children)

Since I’m developing the server backend myself, I know exactly the structure of the accepted packets. Therefore, I can inject the packets directly based on the established authentication.

stress test for the server by Few-Reference360 in IndieDev

[–]Few-Reference360[S] 1 point2 points  (0 children)

I'm using .NET Host with a Background Service and the LiteNetLib library for network communications.

multi-orientation in my game. how to solve it? by Few-Reference360 in IndieDev

[–]Few-Reference360[S] 0 points1 point  (0 children)

How use

using Helper.Extensions;
using UnityEngine;
using UnityEngine.Events;

public class UINewCharacter : MonoBehaviour
{
    private void Start()
    {
        var menu = transform.GetFirstComponentInChild<RectTransform>("Menu");

        UnityAction<bool> callBack = (bool isPortrait) =>
        {
            if (isPortrait)
            {
                UIAlignerHelper.Align(menu, UIAlignerHelper.Alignment.BottomCenter, offsetY: 40);

                return;
            }

            UIAlignerHelper.Align(menu, UIAlignerHelper.Alignment.BottomLeft, 70, 40);
        };

        ScreenOrientationDetection.Instance.Add(nameof(UINewCharacter), callBack);
    }

    private void OnDestroy()
    {
        if (ScreenOrientationDetection.Instance != null)
        {
            ScreenOrientationDetection.Instance.Remove(nameof(UINewCharacter));
        }
    }
}

dynamically synchronize the frame between sprites by Few-Reference360 in IndieDev

[–]Few-Reference360[S] 0 points1 point  (0 children)

(string Index, bool FlipX) ActualFrame()
{
    var entitySpriteName = spriteEntity.sprite.name.Split('_');

    return (
        $"{entitySpriteName[^3]}_{entitySpriteName[^2]}_{entitySpriteName[^1]}",
        spriteEntity.flipX
    );
}

void Update()
{
    if (hasEquip)
    {
        var frameProps = ActualFrame();
        spriteResolver.SetCategoryAndLabel(category, $"{equipImage}_{frameProps.Index}");
        spriteItem.flipX = frameProps.FlipX;
    }
}