Skip to content

Instantly share code, notes, and snippets.

View Watcher3056's full-sized avatar
🤨
Tired of "generic" game developers? Contact me!

Vladylsav Watcher3056

🤨
Tired of "generic" game developers? Contact me!
View GitHub Profile
namespace Pixeye.Source
{
sealed class ProcessorRope : Processor<ComponentRope>, ITick
{
public override void HandleEvents()
{
foreach (ent entity in source.removed)
{
var cRope = entity.componentRope();
cRope.renderer.gameObject.Release();
@TobiasPott
TobiasPott / NestedContentSizeFitter.cs
Last active December 12, 2023 09:19
A helper class/re-implementation of ContentSizeFitter to utilise a referenced transform for automatic sizing operations
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.UI;
#endif
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace VRTX.UI
@valryon
valryon / Extruder.cs
Created November 18, 2016 13:25
Extrude a 2D sprite to a mesh from a Polygon Collider in Unity3D
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
///
/// </summary>
/// <remarks>Source: https://forum.unity3d.com/threads/trying-extrude-a-2d-polygon-to-create-a-mesh.102629/ </remarks>
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer), typeof(PolygonCollider2D))]
public class ExtrudeSprite : MonoBehaviour
@aVolpe
aVolpe / Vibration.cs
Created October 16, 2014 02:45
Vibration for Unity3d with Android native Call, with fallback to Handlheld.Vibrate()
using UnityEngine;
using System.Collections;
public static class Vibration
{
#if UNITY_ANDROID && !UNITY_EDITOR
public static AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
public static AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
public static AndroidJavaObject vibrator = currentActivity.Call<AndroidJavaObject>("getSystemService", "vibrator");