Skip to content

Instantly share code, notes, and snippets.

Oculus Questing...

Milan prucha

Oculus Questing...
View GitHub Profile
prucha / UnityMeshCreator.cs
Last active Oct 23, 2021
Unity: Creating a Mesh in code
View UnityMeshCreator.cs
using UnityEngine;
using System.Collections;
// This Unity script demonstrates how to create a Mesh (in this case a Cube) purely through code.
// Simply, create a new Scene, add this script to the Main Camera, and run.
public class UnityMeshCreator : MonoBehaviour {
GameObject _cube;
View c-sharp-serial-comm.cs
//Socket Code can be used to read serial data being relayed via tinkerproxy.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
View Texture-Unlit.shader
Shader "Milan/Texture Unlit"
_Color("Main Color", Color) = (1,1,1,1)
_MainTex("Main Texture", 2D) = "white" {}
prucha / Fixed-Unlit.shader
Last active Apr 1, 2016
Bare-bones Unity Shader
View Fixed-Unlit.shader
Shader "Milan/Fixed Unlit"
_Color("Main Color", Color) = (1,1,1,1)
prucha / Swift_VideoPlayerViewController.swift
Last active Aug 29, 2015
Play Video via Native Video Player (Swift vs Xamarin)
View Swift_VideoPlayerViewController.swift
// This code snippet was taken from a very simple iPad App, that plays an embedded video file
// via the native IOS video player. The App was set up with a single 'View'.
// The code below is from the 'ViewController', which contains the only significant code
// to be added to the standard template.
// The full project was created in Xcode, using the Apple Swift language
import UIKit
import MediaPlayer
class Swift_VideoPlayerViewController: UIViewController {
prucha / A_CinderStateMachineApp.cpp
Last active Aug 29, 2015
A 'Finite State Machine' implemented in a Cinder App
View A_CinderStateMachineApp.cpp
// 'Finite State Machine' in Cinder
// --------------------------------
// Created by Milan Prucha on 14/05/2015.
1) Create a new Cinder project in Xcode / Visual Studio.
2) Add the other h/cpp files (included below) to your project.
3) Then use the code in this cpp, in your main Cinder App cpp.
prucha / OpenFileInDefaultApp.cpp
Created May 6, 2015
Open a file in its default program (Windows)
View OpenFileInDefaultApp.cpp
// Opening a File (e.g. Video) in its default program
// --------------------------------------------------
This method, using the 'ShellExecute' command, only works in Windows
(tested in Windows 7).
The code snippet was taken from an App created using Cinder,
a C++ Framework for Creative Coding:
However, 'ShellExecute' should work in standard Windows Desktop Apps.
prucha / VideoScrubbingCinderApp.cpp
Last active Aug 29, 2015
Video Scrubbing With Cinder (Mac OSX / Xcode)
View VideoScrubbingCinderApp.cpp
// Video Scrubbing With Cinder (Mac OSX)
// -------------------------------------
Create a Cinder project in Xcode (adding the QuickTime Cinder Block).
Then use this code in your main App cpp.
When the app running, you should be able to scrub the video by dragging the mouse
horizontally across the app window.
#include "cinder/app/AppNative.h"