Skip to content

Instantly share code, notes, and snippets.

View SimonDarksideJ's full-sized avatar

Simon (Darkside) Jackson SimonDarksideJ

View GitHub Profile
@SimonDarksideJ
SimonDarksideJ / gist:5720808
Created June 6, 2013 11:14
Sample to close the XNA Guide Keyboard when Phone / System is deactivated (tombstoned)
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
@SimonDarksideJ
SimonDarksideJ / SimpleGeo.cs
Created August 5, 2016 16:44 — forked from phosphoer/SimpleGeo.cs
Simple Geometry Painter for Unity
// The MIT License (MIT)
// Copyright (c) 2016 David Evans @phosphoer
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
@SimonDarksideJ
SimonDarksideJ / BuildAutomation.cs
Created January 26, 2018 15:32 — forked from simonbroggi/BuildAutomation.cs
Build mutliple Unity applications for multiple platforms with one click
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class BuildAutomation {
public struct BuildTargetAndGroup {
public BuildTargetGroup group;
public BuildTarget target;
@SimonDarksideJ
SimonDarksideJ / MakeA3DObjectDraggable.cs
Created May 9, 2018 19:31 — forked from rstecca/MakeA3DObjectDraggable.cs
How to make a 3D object draggable in Unity3D
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
/*
MAKE A 3D OBJECT DRAGGABLE
Riccardo Stecca
http://www.riccardostecca.net
@SimonDarksideJ
SimonDarksideJ / GetButtonsDown.cs
Created June 5, 2019 10:18
Simple script used to identify the Unity inputs from a controller (where documentation lets you down)
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GetButtonsDown : MonoBehaviour
{
string[] joysticks;
int joysticksCount = 0;
// Start is called before the first frame update
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Search.Documents" Version="11.3.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.15.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.13" />
<PackageReference Include="morelinq" Version="3.3.2" />
@SimonDarksideJ
SimonDarksideJ / DragManipulator.cs
Created October 20, 2022 11:16 — forked from shanecelis/DragManipulator.cs
This manipulator makes a visual element draggable at runtime in Unity's UIToolkit.
/* Original code[1] Copyright (c) 2022 Shane Celis[2]
Licensed under the MIT License[3]
[1]: https://gist.github.com/shanecelis/b6fb3fe8ed5356be1a3aeeb9e7d2c145
[2]: https://twitter.com/shanecelis
[3]: https://opensource.org/licenses/MIT
*/
using UnityEngine;
using UnityEngine.UIElements;
@SimonDarksideJ
SimonDarksideJ / DynamicLibraryManager.cs
Created November 15, 2022 11:55
ARFoundation Dynamic Image loading solution using the "Update" method instead of "Job" method
using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using UnityEngine.XR.ARFoundation;
using UnityEngine.XR.ARSubsystems;
/// <summary>
@SimonDarksideJ
SimonDarksideJ / TinyTween.cs
Created November 30, 2022 12:12 — forked from FronkonGames/TinyTween.cs
A Complete and Easy to use Tweens library in One File.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// _____ _ _____
// |_ _|_|___ _ _ |_ _|_ _ _ ___ ___ ___
// | | | | | | | | | | | | | -_| -_| |
// |_| |_|_|_|_ | |_| |_____|___|___|_|_|
// |___|
// A Complete and Easy to use Tweens library in One File
//
// Basic use:
@SimonDarksideJ
SimonDarksideJ / ResetSelectableHighlight.cs
Created February 1, 2023 14:52
Handy Selectable script to unhighlight a selectable component in Unity (e.g. a Button) when the user moves away from it, EVEN IF the user has holding a button on it
/*
Handy Selectable script to unhighlight a selectable component in Unity (e.g. a Button) when the user moves away from it, EVEN IF the user has holding a button on it.
Resolves the situation where Unity UI Components remain in a highlighted state even after the pointer has moved away (e.g. user holding a button, mouse, pointer down).
Now whenever the cursor leaves the component, it will force the UI compinent to revert to unhighlighted
*/
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;