Skip to content

Instantly share code, notes, and snippets.

View RoxDevvv's full-sized avatar
😀
i enjoy creating projects

SelfDev RoxDevvv

😀
i enjoy creating projects
View GitHub Profile
@RoxDevvv
RoxDevvv / CreateScriptFromTemplate.cs
Created July 24, 2024 10:23
Unity Script templates Creation
// Place this script in 'Editor' Folder
// Create a folder named 'Templates' at the same directory level as the 'Editor' folder, but outside of it.
// Create 'ScriptName.cs.txt' in 'Templates' Folder
// Done
using System.IO;
using UnityEditor;
using UnityEngine;
@RoxDevvv
RoxDevvv / XrUIdocument.txt
Last active July 13, 2023 06:35
Unity Xr and UI element world space
using UnityEngine;
using UnityEngine.UIElements;
using UnityEngine.XR.Interaction.Toolkit;
public class XrRay2UIelement : MonoBehaviour
{
UIDocument document;
[SerializeField] private XRRayInteractor rayInteractor;
private void Start()
init() {
/*
* mean safe place but not start place
Board[1] == safe place // entry of first player
Board[9] == safe place *
Board[14] == safe place // entry of second player
Board[22] == safe place *
Board[27] == safe place // entry of Third player
Board[35] == safe place *
Board[40] == safe place // entry of fourth player
class Player extends Schema { }
schema.defineTypes(Player, {
UUID: "string",
PAWNS: "string",
PicUrl: "string",
NickName: "string",
});
class board extends Schema {
}
schema.defineTypes(board, {