Scroll View Problem, please help at wit's end

I’d like to do a very simple thing. I have a unity scroll view (horizontal only, unrestricted). The content panel has 6 children items that are manually spaced apart for now. The scroll view RectTransform, the content RectTransform, and the item RectTransforms are all alt-shift-centered (pivots, anchors, position). All I want to do is set the content.anchoredPosition to a value from the Start() method of a custom script like so:

public class ScrollHelper : MonoBehaviour
{
    public RectTransform content;
    public GameObject[] items;

    private int startItemIndex;
    private int currentItemIndex;

    void Start()
    {
        startItemIndex = Random.Range(1, items.Length);
        currentItemIndex = startItemIndex;
        float x = currentItemIndex * -245f;
        Vector2 desiredPosition = new Vector2(x, 0f);
        content.anchoredPosition = desiredPosition;
        Debug.Log(content.anchoredPosition);
    }
}

Running this script the debug logs the correct anchored position (in this case it’s randomly assigned to avoid 0), however in the play window and in the inspector the content stays at x of 0, not the desiredPosition we get in the start method (should be like( -245,0),(-490,0) etc…)

Now, I did the following hack and it sort of works, like in this example when there is no update method with any logic in it, it will set the content to the desiredPosition and not revert content.anchoredPosition to (0,0):

void Start()
    {         
        Invoke("fix", .1f);
    }

    private void fix()
    {
        startItemIndex = Random.Range(1, items.Length);
        currentItemIndex = startItemIndex;
        float x = currentItemIndex * -245f;
        Vector2 desiredPosition = new Vector2(x, 0f);
        content.anchoredPosition = desiredPosition;
        Debug.Log(content.anchoredPosition);
    }

Two problems, a) seems like it’s a hack, and I don’t really understand why it’s fixing it except to guess that invoke fires after whatever changed content.anchoredPosition to 0 after the end of my script’s Start method.

b) more problematically, it doesn’t always work. I’m expanding the logic of this scroller, and as soon as I have some new update logic (that doesn’t even reference content.anchoredPosition), it sometimes reverts to the behavior of setting the content.anchoredPosition to (0,0) even after the fix invoke. It’s very unpredictable: even toggling comments and irrelevant logic seems to trigger the undesired behavior of returning to (0,0). Anyway, please help if you are aware of this issue and lmk how I can fix it or get around it, ty in advance.

Bumping, I made a new project to reproduce the issue. It contains only two scroll views and two “Scroll Helper” objects. Here is the project screenshot:

This is the “ScriptHelper” class:

using UnityEngine;

public class ScrollHelper : MonoBehaviour
{
    public RectTransform myContent;
    public bool runFixAtStart;

    void Start()
    {
        if (runFixAtStart)
        {
            fix();
        }
        else
        {
            Invoke("fix", .1f);
        }
    }

    private void fix()
    {
        int startItemIndex = Random.Range(1, 5);
        int currentItemIndex = startItemIndex;
        float x = currentItemIndex * -220f;
        Vector2 desiredPosition = new Vector2(x, 0f);
        myContent.anchoredPosition = desiredPosition;
        Debug.Log(gameObject.name + ": runFixAtStart = " + runFixAtStart + ", anchoredPosition = " + myContent.anchoredPosition);
    }
}

In the screen shot you can see that “Scroll Helper One” executes the fix() method from Start() and sets the myContent.anchoredPosition to (-660,0), but “Scroll View One” sets/stays at position (0,0) in the game view/editor

“Scroll Helper Two” invokes fix() after .1f and successfully moves the position to (-440,0) and you can see the 3rd element of the scroll view is in the center.