Skip to content

Instantly share code, notes, and snippets.

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

mika unitycoder

✅
‏‏‎
View GitHub Profile
@unitycoder
unitycoder / ParallaxObject.cs
Created February 5, 2019 08:44
parallax effect in editor
// parallax effect in editor
// https://old.reddit.com/r/Unity3D/comments/an90qs/this_little_tool_made_me_so_happy/
using UnityEngine;
using Sirenix.OdinInspector; //this requires Odin to use the buttons, but you could write a custom editor to do the same thing. I'm not going to teach you how to do that, though. :)
using UnityEditor;
[ExecuteInEditMode] //run this script in the editor.
public class ParallaxObject : MonoBehaviour {
bool emulateGameCamera = false;
@unitycoder
unitycoder / Registry.md
Last active March 3, 2024 19:45
New PC Setup Tools Applications Settings
@unitycoder
unitycoder / NativeRenderCall.cs
Last active February 6, 2019 06:31
Native Texture2D Render
// https://forum.unity.com/threads/texture-byte-per-pixel.624343/#post-4185943
[DllImport ("__Internal")]
private static extern void dispatcher1_rendercolor(
System.IntPtr pixels, int span, int flags);
public static void PinTextureAndCallNativeRenderColor( Texture2D t2d, int span, bool clean = false)
{
@unitycoder
unitycoder / vr-notes.txt
Last active May 11, 2020 07:53
VR Notes
xr collab tools https://xrcollaboration.com/directory
NullReferenceException: Object reference not set to an instance of an object
Valve.VR.SteamVR_Skeleton_Poser+SkeletonBlendablePose..ctor (Valve.VR.SteamVR_Skeleton_Pose p) (at Assets/SteamVR/Input/SteamVR_Skeleton_Poser.cs:340)
Valve.VR.SteamVR_Skeleton_Poser.Awake () (at Assets/SteamVR/Input/SteamVR_Skeleton_Poser.cs:68)
UnityEngine.Object:Instantiate(GameObject)
Valve.VR.InteractionSystem.RenderModel:InitializeHand() (at Assets/SteamVR/InteractionSystem/Core/Scripts/RenderModel.cs:49)
Valve.VR.InteractionSystem.RenderModel:Awake() (at Assets/SteamVR/InteractionSystem/Core/Scripts/RenderModel.cs:40)
UnityEngine.Object:Instantiate(GameObject)
@unitycoder
unitycoder / 3d-modeling-tips
Last active February 23, 2024 10:40
3D Modeling Tips - Normals - Textures - Resolution - UV Mapping
- https://www.reddit.com/r/starcitizen/comments/3ogi3o/im_an_tech_artist_in_the_industry_and_id_love_to/
- unwrap https://docs.pixologic.com/user-guide/zbrush-plugins/uv-master/unwrap-tutorials/
@unitycoder
unitycoder / teams-ux-notes.md
Last active November 19, 2026 07:30
Whats Wrong With Microsoft Teams - UX

Whats Wrong With Microsoft Teams

  • not in any order, and i know few of these have been fixed, like having conference in separate window
  • This first list is for Classic version, New Teams specific are in the gist below (but new Teams has most of the classic bugs still too)

Chat

  • If you typed message in some chat, then alt tab and go to another chat, that message is still in the chatbox (wrong room)
  • if there is many single messages, with link on each, tooltip emoji menu popups and blocks your view to previews item (and you can accidentally click it if tried to click the previous link)
  • if paste image to messagebox, messagebox stays very small 2 rows.. so cannot see anything (or wait, it expands after you alt tab away..)
  • channel mention doesnt show alerts for people by default
  • replies minimize automatically if leave chat open for a while (so context is lost where you left it)
@unitycoder
unitycoder / xamarin.txt
Last active February 26, 2019 10:22
Visual Studio Xamarin Notes (Mobile Android and iOS)
How to open Xamarin Visual Designer?
- Click the small white box icon in top right corner of Xaml editing window, then click split view bottom right on that window
- Note: Its only preview, there is NO visual designer like wpf/winforms.
- Note: If you create native layout in target device resources folder, you CAN have visual editor to that
------------------------------------------------
Missing Xamarin.Native template
- it was removed from the recent vs2017 versions
- https://developercommunity.visualstudio.com/content/problem/318064/xamarin-native-project-template-missing.html
@unitycoder
unitycoder / drawgrid.cs
Created February 13, 2019 17:39
Draw Grid Pattern in For Loop
for (int x = 0; x < 16; x++)
{
for (int y = 0; y < 16; y++)
{
byte v = (byte)(((x % 2) == (y % 2)) ? 255 : 0);
c.Red = v;
c.Green = v;
c.Blue = v;
c.Alpha = 32;
SetPixel(targetBitmap, x, y, (int)c.ColorBGRA);
@unitycoder
unitycoder / fixphotoviewer.reg
Created February 14, 2019 15:19
Windows 10 Bring Back PhotoViewer (registry fix)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll]
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell]
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open]
"MuiVerb"="@photoviewer.dll,-3043"
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command]