Skip to content

Instantly share code, notes, and snippets.

@nothke
nothke / xfont_main.cpp
Last active Sep 19, 2021
Font experiment, loading from MBFont
View xfont_main.cpp
#include "pch.h"
#include "noclip_controller.h"
struct FChar
{
char id;
int x, y;
int width, height;
View ExampleMenu.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Nothke.SimpleMenu;
using TMPro;
public class ExampleMenu : Menu
{
int intTest = 10;
View CarToque.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CarTorque : MonoBehaviour
{
//// Inspector
[Header("Geometry")]
public float wheelbase = 1;
View hof_exporter.py
bl_info = {
"name": "Hof Vehicle Export",
"category": "Object",
"blender": (2, 80, 0)
}
import bpy
import os
from bpy.props import IntProperty
from bpy.props import StringProperty
View twitter_hq_handbrake_preset.plist
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist>
<array>
<dict>
<key>AudioList</key>
<array>
<dict>
<key>AudioBitrate</key>
<string>128</string>
View ObjectPreviewer.cs
using System.Collections.Generic;
using UnityEngine;
public static class ObjectPreviewer
{
struct Node
{
public Matrix4x4 transform;
public Mesh mesh;
public Material[] mats;
View LabelDrawer.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LabelDrawer : MonoBehaviour
{
struct Label3D
{
public readonly string text;
public readonly Vector3 position;
View GizmoUtils.cs
using UnityEngine;
public static class GizmoUtils
{
public static void DrawCircle(Vector3 pos, Vector3 forward, float radius)
{
#if UNITY_EDITOR
UnityEditor.Handles.color = Gizmos.color;
UnityEditor.Handles.CircleHandleCap(
-1, pos, Quaternion.LookRotation(forward), radius, EventType.Repaint);
View BuildKCCPlatform.cs
/// Add this script to the parent of colliders you wish to sync to the root rigidbody
using KinematicCharacterController;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BuildKCCPlatform : MonoBehaviour
{
public Transform source;
View publish-to-itch.py
# A script for single [double] click uploading to itch using butler
# by Nothke
#
# Requirements:
# - Installed butler: https://itch.io/docs/butler/
# - butler added to PATH
#
# How to use:
# 1. Put this script in your project folder,
# 2. Edit the script by adding project names and ignores below