This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DllImport("user32.dll", EntryPoint = "SetLayeredWindowAttributes")] | |
private static extern int SetLayeredWindowAttributes(IntPtr hwnd, int crKey, byte bAlpha, int dwFlags); | |
[DllImport("user32.dll")] | |
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, uint dwNewLong); | |
// Sets window to pass through clicks. | |
private void SetInactive() { | |
#if !UNITY_EDITOR | |
SetWindowLong(hwnd, GWL_STYLE, WS_POPUP | WS_VISIBLE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CubismModel model = ...; | |
// Call it like this: | |
void Start() { | |
// ... | |
CubismParameter myParam = model.GetParam("ParamIDName"); | |
// ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using Live2D.Cubism.Core; | |
using Live2D.Cubism.Rendering; | |
using UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// Replace active Live2D model texture temporarily | |
/// at runtime or permanently in editor. | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Live2D.Cubism.Core; | |
using Live2D.Cubism.Framework; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class L2DTest : MonoBehaviour | |
{ | |
[Range(-30, 30)] | |
public float paramValue; | |
private CubismModel model; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Live2D.Cubism.Core; | |
using Live2D.Cubism.Framework.Json; | |
using System; | |
using System.IO; | |
using System.Text; | |
using UnityEngine; | |
public static class ExternalCubismModelLoader | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Welcome to the VTube Studio Headquarter!", | |
"description": "\n**Hi %user%! ** Good to have you with us!\n\nIf you just want to hang out and talk a bit, why don't you introduce yourself in <#652602255748497458>?\n\nBefore you ask questions though, please check the channels <#717998026547003393> and <#718909794420785162> first. Maybe your question was already answered.\n\nAlso, if you want a **role**, check the pinned message in <#727489986647031838>.\n\nEnjoy your stay! :sparkles:", | |
"color": 53380, | |
"image": "https://i.imgur.com/kSuASrY.png" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To listen for remote connections, change this to 0.0.0.0 or your actual IP on the desired interface. | |
ip=0.0.0.0 | |
# This is the port the server will listen for tracking packets on. | |
port=11573 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
from socket import timeout | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0) | |
s.bind(("0.0.0.0", 47779)); | |
s.settimeout(0.5) | |
while True: | |
try: | |
data, address = s.recvfrom(4096) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
/// <summary> | |
/// Queue for calculating sliding averages. Not thread safe. | |
/// </summary> | |
public class SlidingWindowQueue | |
{ | |
/// <summary> | |
/// The queue wrapped by this class. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/ColorRepairShader" | |
{ | |
Properties | |
{ | |
_MainTex("Texture", 2D) = "white" {} | |
_Key("Key Color", color) = (0,0,0,0) | |
} | |
Subshader | |
{ | |
Pass |