C
C#14mo ago
16Bit_Felix

❔ Value types keep on changing??

I have been dealing with this problem for a few days and couldn't find any solution or person who had to deal with the same situation. In my project, one value type (No matter which one) always seems to change it's value after a specific amount of time (time varies with type and there seems to be no reference in the project that changes it unexpectedly). Could it be because of the GC? Or am i doing something wrong code wise?
20 Replies
ZacharyPatten
ZacharyPatten14mo ago
you must have a bug in your code. we probably need to see your code
16Bit_Felix
16Bit_FelixOP14mo ago
Here's the zipped version
ZacharyPatten
ZacharyPatten14mo ago
please use GitHub or $paste
MODiX
MODiX14mo ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
16Bit_Felix
16Bit_FelixOP14mo ago
The problem seems to be originating from the transform struct in the transforming file
16Bit_Felix
16Bit_FelixOP14mo ago
https://github.com/32BitFelix/FinderEngine here's the link to the repo
GitHub
GitHub - 32BitFelix/FinderEngine: Engine written in C# with the aid...
Engine written in C# with the aid of opentk. Contribute to 32BitFelix/FinderEngine development by creating an account on GitHub.
16Bit_Felix
16Bit_FelixOP14mo ago
The error seems to be originating from the transform class from the Utility/Transforming.cs file
ZacharyPatten
ZacharyPatten14mo ago
first off.. you need to set your resources to copy if newer
ZacharyPatten
ZacharyPatten14mo ago
No description
ZacharyPatten
ZacharyPatten14mo ago
You code will fail if those files are not copied to your build directory so you just need to update that setting to make sure the files get copied when you build
16Bit_Felix
16Bit_FelixOP14mo ago
Okay But the error appeared when i runned it directly with the "dotnet run" command No pre built version was in use
ZacharyPatten
ZacharyPatten14mo ago
even so, just change that setting. they should have that setting
16Bit_Felix
16Bit_FelixOP14mo ago
Alright Other than that, did you notice anything else?
ZacharyPatten
ZacharyPatten14mo ago
still looking
16Bit_Felix
16Bit_FelixOP14mo ago
Alright, found the problem @ZP ░▒▓█├■̶˾̶͞■┤█▓▒░ I was having a "persistent" reference at another object to a pointer that was made out with the "fixed" operator from the transform struct. I now made it that the "persistent" reference is updated every update call. But thanks for into looking into it nonetheless and the feedback you gave me for the files
ZacharyPatten
ZacharyPatten14mo ago
nice nice Have you heard of Silk.NET before?
16Bit_Felix
16Bit_FelixOP14mo ago
Just a little, why?
ZacharyPatten
ZacharyPatten14mo ago
I personally startied usign that over OpenTK https://github.com/dotnet/Silk.NET I like it a bit better so far Also there is https://github.com/terrafx/terrafx if you want low-level bindings rather than OpenTK and Silk's higher level wrappers
16Bit_Felix
16Bit_FelixOP14mo ago
Holy god, that seems like THE binding for engine development in c# Thanks for telling, I'll check these out
Accord
Accord14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server