Swapping the order of field declarations lead to an unexpected results.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Reproduce the issue in Unity with the C# script and swapped field declarations shown in the report. Inspect the hot-reload field restoration path, focusing on whether fields are matched by declaration order; done means reloading preserves i1 as 1 and does not interpret i2's bits as an integer.
Written by the indexing model from the issue text.
Description
When script
using System.Collections;
using System.Collections.Generic;
using Unity.Mathematics;
using UnityEngine;
public class Test : MonoBehaviour
{
int i1;
float i2;
void Start()
{
i1 = 1;
i2 = 1.5f;
}
void Update()
{
Debug.Log(i1);
}
}
swap the declaration positions of i1 and i2 and reload to
using System.Collections;
using System.Collections.Generic;
using Unity.Mathematics;
using UnityEngine;
public class Test : MonoBehaviour
{
float i2;
int i1;
void Start()
{
i1 = 1;
i2 = 1.5f;
}
void Update()
{
Debug.Log(i1);
}
}
expected output was 1, but the actual output was 1069547520 (this is the value of a 1.5 as an integer in binary).
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from handzlikchris/FastScriptReload
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
handzlikchris/FastScriptReload#202 · 2 reactions ·
-
csc.rsp supportOpen
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
handzlikchris/FastScriptReload#203 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in handzlikchris/FastScriptReload
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
lay295/TwitchDownloader#1675 ·
-
copilot documentation
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
space-wizards/RobustToolbox#7119 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 4 days
-
.NET Bug Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-dotnet#5666 · 2 comments ·
Maintainers usually reply within 2 days