using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Runtime.InteropServices;
using System;
public class WindowPosition : MonoBehaviour
{
public int x = 0;
public int y = 0;
#if UNITY_STANDALONE_WIN
[DllImport("user32.dll", EntryPoint = "SetWindowPos")]
private static extern bool SetWindowPos(IntPtr hwnd, int hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags);
[DllImport("user32.dll", EntryPoint = "FindWindow")]
public static extern IntPtr FindWindow(string className, string windowName);
public IEnumerator SetWindowPosition(int x, int y)
{
yield return new WaitForEndOfFrame();
yield return new WaitForEndOfFrame();
SetWindowPos(FindWindow(null, Application.productName), 0, x, y, 0, 0, 5);
}
public IEnumerator SetWindowPosition(float x, float y)
{
StartCoroutine(SetWindowPosition(Screen.width * x, Screen.height * y));
yield return null;
}
#endif
// Start is called before the first frame update
void Start()
{
#if UNITY_STANDALONE_WIN
StartCoroutine(SetWindowPosition(x,y));
#endif
}
// Update is called once per frame
void Update()
{
}
}
hint: You have divergent branches and need to specify how to reconcile them. hint: You can do so by running one of the following commands sometime before hint: your next pull: hint: hint: git config pull.rebase false # merge hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation. fatal: Need to specify how to reconcile divergent branches.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Demo : MonoBehaviour
{
public Test[] tests;
[System.Serializable]
public class Test
{
public int num = 0;
public string name = "";
}
// Start is called before the first frame update
void Start()
{
var csv = "num,name\n0,\"mom\"\r\n1,dad\n\"2\",\"me\"\n\"3\",\"한국어\"";
tests = CSVSerializer.Deserialize<Test>(csv);
var list = CSVSerializer.ParseCSV(csv);
for (int x = 0; x < list.Count; x++)
{
for (int y = 0; y < list[x].Length; y++)
{
Debug.Log($"[{x}][{y}]{list[x][y]}");
}
}
}
// Update is called once per frame
void Update()
{
}
}