Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
‏‏‎

mika unitycoder

‏‏‎
View GitHub Profile
@TobiasSekan
TobiasSekan / WPF_Error_HV_ContentAlignment.md
Last active October 15, 2025 05:39
[WPF] Fix for -> System.Windows.Data Error: 4 -> HorizontalContentAlignment and VerticalContentAlignment

Fix for debug output errors

Add the follow lines to the file App.xaml in your WPF application

    <!--
        Global fix for
        
        System.Windows.Data Error: 4 :
        Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''.
@StigOlavsen
StigOlavsen / arproxy.shader
Last active November 10, 2021 08:01
Unity shader for LWRP and AR Foundation, renders as transparent with occlusion and shadows. Put this on AR planes to get shadows and occlusion for 3D objects.
Shader "AR Proxy"
{
Properties
{
}
SubShader
{
Tags
{
@wybiral
wybiral / noscript-tracking.go
Last active October 28, 2024 23:01
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@JanHolger
JanHolger / Line.java
Last active May 4, 2019 17:48
A simple example of 2d raycasting using linear equation systems
package eu.bebendorf.raycasting;
public class Line {
Point a;
Point b;
public Line(Point a, Point b){
this.a = a;
this.b = b;
// Shader targeted for low end devices. Single Pass Forward Rendering.
Shader "Custom/Shadows Only"
{
// Keep properties of StandardSpecular shader for upgrade reasons.
Properties
{
_Alpha("Shadow Alpha", float) = 0.5
// Blending state
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DragObject : MonoBehaviour {
private Vector3 mOffset;
private float mZCoord;
@kirurobo
kirurobo / TransparentWindow.cs
Created February 16, 2019 09:11 — forked from wakagomo/TransparentWindow.cs
Transparent Window for Unity
///
/// Copyright (c) 2019 wakagomo
///
/// This source code is released under the MIT License.
/// http://opensource.org/licenses/mit-license.php
///
using UnityEngine;
using System;
using UnityEngine;
using UnityEngine.Profiling;
using System.Runtime.CompilerServices;
using System.Collections.Generic;
public class VectorTest : MonoBehaviour
{
Vector3[] array;
List<Vector3> list;
@pervognsen
pervognsen / rad.py
Last active January 18, 2024 02:30
# Reverse-mode automatic differentiation
import math
# d(-x) = -dx
def func_neg(x):
return -x, [-1]
# d(x + y) = dx + dy
def func_add(x, y):