Skip to content

Instantly share code, notes, and snippets.

- General
[ ] The code works
[ ] The code is easy to understand
[ ] Follows coding conventions
[ ] Names are simple and if possible short
[ ] Names are spelt correctly
[ ] Names contain units where applicable
[ ] Enums are used instead of int constants where applicable
[ ] There are no usages of 'magic numbers'
[ ] All variables are in the smallest scope possible
@JVinceW
JVinceW / SpecificInstanceOfGameExample.cs
Created December 20, 2018 03:22 — forked from mattbenic/SpecificInstanceOfGameExample.cs
Example of using Win32 API to get specific window instance in Unity. This is useful for when running multiple instances of the same application, as the window handle can then be used to correctly position and size the different windows for multi screen use.
using UnityEngine;
using System;
using System.Runtime.InteropServices;
using System.Text;
public class SpecificInstanceOfGameExample : MonoBehaviour
{
#region DLL Imports
private const string UnityWindowClassName = "UnityWndClass";
@JVinceW
JVinceW / 1.md
Created December 25, 2018 02:33 — forked from LotteMakesStuff/1.md
UPM: How to make a custom package

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!

@JVinceW
JVinceW / readme.md
Created March 14, 2019 04:26 — forked from jobsamuel/readme.md
Run NodeJS as a Service on Ubuntu 14.04 LTS

Run NodeJS as a Service on Ubuntu 14.04 LTS

With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But > how do you make it run nicely in the background like a true server?

  • Go to /etc/init/
  • $ sudo vim yourapp.conf
  • Paste script.conf
  • $ sudo start yourapp
  • And when you wanna kill the process $ sudo stop yourapp
/// <summary>
/// シングルトンクラス
/// </summary>
public class Singleton <T> where T : class , new()
{
private static T _instance;
//インスタンスの取得
public static T instance{
@JVinceW
JVinceW / AppManager.cs
Last active April 22, 2023 04:18
Application Main Manager
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
namespace BrkLib.Scripts.Core {
[SuppressMessage("ReSharper", "UseNullPropagation")]

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@JVinceW
JVinceW / AppBuilder.cs
Created October 8, 2022 15:01
Simple fast build script for Unity application
using System.Collections;
using System.IO;
using UnityEditor;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Build;
using UnityEditor.AddressableAssets.Settings;
using UnityEngine;
namespace Scripts.AppBuilder
{
@JVinceW
JVinceW / SceneObject.cs
Created March 1, 2023 15:39 — forked from Hertzole/SceneObject.cs
Unity scene object to easily assign scenes in the inspector.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
[System.Serializable]
public class SceneObject
{
[SerializeField]
private string m_SceneName;
@JVinceW
JVinceW / FindMissingScriptsRecursivelyAndRemove.cs
Last active May 28, 2023 13:46
Find missing scripts recursively and remove it editor
/*
Ref: https://forum.unity.com/threads/remove-all-missing-reference-behaviours.286808/#post-3113536
https://pastebin.com/raw/DLuE2Ze9
*/
using UnityEditor;
using UnityEngine;
namespace FLGCoreEditor.Utilities
{
public class FindMissingScriptsRecursivelyAndRemove : EditorWindow