zandose
zandose
CC#
Created by zandose on 3/15/2023 in #help
❔ I'm trying to convert a Vector3 string to a Vector3 but the numbers returned aren't correct.
Thank you all for your help in understanding the issue. I believe I have found a solution by using
public Vector3 ConvertStringToVector3(string s)
{
float[] f = s.Split(',').Select(part => float.Parse(part)).ToArray();
Vector3 vector3;
if (f.Length <= 2) { vector3 = new Vector3(f[0], f[0], f[0]); }
else { vector3 = new Vector3(f[0], f[1], f[2]); }
return vector3;
}
public Vector3 ConvertStringToVector3(string s)
{
float[] f = s.Split(',').Select(part => float.Parse(part)).ToArray();
Vector3 vector3;
if (f.Length <= 2) { vector3 = new Vector3(f[0], f[0], f[0]); }
else { vector3 = new Vector3(f[0], f[1], f[2]); }
return vector3;
}
11 replies
CC#
Created by zandose on 3/15/2023 in #help
❔ I'm trying to convert a Vector3 string to a Vector3 but the numbers returned aren't correct.
For instance, I'll have the string "1" and everything appears to be fine with the debug messages but when it's used in the actual vector3 = new Vector3(StringToConvert[0], StringToConvert[0], StringToConvert[0]); it changes to the numbers 49.
11 replies
CC#
Created by zandose on 12/8/2022 in #help
❔ HTTP code not returning expected result.
Just need to figure out how to add in the
var content = new FormUrlEncodedContent(new[] { new KeyValuePair<string, string>("Test1", "Test2") });
var content = new FormUrlEncodedContent(new[] { new KeyValuePair<string, string>("Test1", "Test2") });
part
26 replies
CC#
Created by zandose on 12/8/2022 in #help
❔ HTTP code not returning expected result.
OK, so this works
var result = await client.GetAsync("http://zandose1.centralus.cloudapp.azure.com/test.php?Test1=Test2");
var resultContent = await result.Content.ReadAsStringAsync();
Debug.Log(resultContent);
var result = await client.GetAsync("http://zandose1.centralus.cloudapp.azure.com/test.php?Test1=Test2");
var resultContent = await result.Content.ReadAsStringAsync();
Debug.Log(resultContent);
26 replies
CC#
Created by zandose on 12/8/2022 in #help
❔ HTTP code not returning expected result.
I was just testing by returning everything. I haven't made the PHP correct and secure yet.
26 replies
CC#
Created by zandose on 12/8/2022 in #help
❔ HTTP code not returning expected result.
Hmm
26 replies
CC#
Created by zandose on 12/8/2022 in #help
❔ HTTP code not returning expected result.
Thanks and done. Same result. Basically the PHP code takes the URL and returns it
echo "test | " . $_SERVER['QUERY_STRING'];
echo "test | " . $_SERVER['QUERY_STRING'];
but it's only returning the test part.
26 replies
CC#
Created by zandose on 12/8/2022 in #help
❔ HTTP code not returning expected result.
I'll try rewriting it with awaits
26 replies
CC#
Created by zandose on 12/8/2022 in #help
❔ HTTP code not returning expected result.
alright
26 replies
CC#
Created by zandose on 12/8/2022 in #help
❔ HTTP code not returning expected result.
Is it required to make it work?
26 replies
CC#
Created by zandose on 12/8/2022 in #help
❔ HTTP code not returning expected result.
I was having issues writing the code with awaiting so I got rid of them for testing.
26 replies