Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
✅
‏‏‎

mika unitycoder

✅
‏‏‎
View GitHub Profile
@unitycoder
unitycoder / algorithms.txt
Last active November 14, 2026 16:36
algorithms meshing mesh reconstruction triangulate
Minsky's 1972 circle algorithm
if every projection of a 3d convex body is a disk, it must be a sphere!
(meaning: it doesnt matter how you rotate the 3d object, it always casts disk shape shadow)
fibonacci
- this value is sum of 2 previous numbers
// flip value between other value and original value
int a = 90;
@unitycoder
unitycoder / unity-shader-properties.shader
Last active September 25, 2021 17:28
Unity Shader Properties
Shader "Name"
{
Properties
{
_MyFloat("Float", Float) = 0
_MyRange ("Range", Range (0.0,1.0)) = 0.5
_Mycolor ("Color", Color) = (0.5, 0.0, 0.0, 1.0)
_MyInt ("Int", Int) = 1
@unitycoder
unitycoder / ContinueCoroutine.cs
Created June 18, 2019 19:27
Continue CoRoutine After Gameobject was disabled and then enabled (with .setActive)
// example script for restarting Coroutine after gameobject was disabled (and continue from previous timer value)
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
public class ContinueCoroutine : MonoBehaviour
{
public float duration = 5f;
@unitycoder
unitycoder / AudioClipToMP3.cs
Created June 19, 2019 06:17
export MP3 from unity audioclip
// export MP3 from unity audioclip
// https://forum.unity.com/threads/exporting-mp3-file-from-audioclip.697175/
/* GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@unitycoder
unitycoder / unity-oculus-quest.md
Last active September 18, 2026 10:26
Unity Oculus Quest Notes

How to make 3d object clickable

  • add "Tracked Device Physics Raycaster" to your main camera
  • then your 3d object reacts to vr selection ray (for example if it implements IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler)

how to make worldspace UI elements clickable (like buttons)

add "Tracked Device Graphic Raycaster" component to canvas

teleportation area doesnt work

@unitycoder
unitycoder / microsoft-office-notes.md
Last active July 20, 2022 08:21
Microsoft Office Word Outlook Excel Notes
@unitycoder
unitycoder / AdbCommands
Created August 13, 2019 14:23 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@unitycoder
unitycoder / twitter.txt
Created August 15, 2019 13:00
Twitter Notes
How to unlock your account?
Every new account seems to get locked, if you dont place your phone number there.
If you dont want to put your phone there to unlock it, use the form to appeal https://help.twitter.com/forms/general?subtopic=suspended
Normally it works within few days.
If it doesnt, you cannot open new issues until your first issue is resolved.
Replying to the support emails bounces back with "You tried to update a case that has been closed."
to workaround it, use the support forms (while being logged in the locket account)
@unitycoder
unitycoder / AndroidManifest.xml
Last active March 30, 2024 19:39
Oculus Quest Android Manifest (with READ_EXTERNAL_STORAGE, LAUNCHER and SkipPermissionsDialog)
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto">
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" /><!-- Request the headset DoF mode -->
<application
android:label="@string/app_name"
android:icon="@mipmap/app_icon">
<activity
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
@unitycoder
unitycoder / minecraft-cannot-login.txt
Last active January 15, 2020 13:10
Minecraft Java Client Cannot Login (Password is correct, works on website)
LAN one pc cannot see LAN games
- use direct connect
--------------------
Client says cannot login (wrong password or email), but you are using correct password and email (it works on the mojang login)
// solution
check windows/drivers/etc/hosts file, it might have authserver.mojang.com set to wrong ip address!