Skip to content

Instantly share code, notes, and snippets.

View giacomelli's full-sized avatar
🎮
gamedev

Diego Giacomelli giacomelli

🎮
gamedev
View GitHub Profile
var projectNamespace = "Sample.Data";
@giacomelli
giacomelli / UnityEventExtensions.cs
Last active November 6, 2021 18:25
UnityEvent Dump Log
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using UnityEngine.Events;
namespace Giacomelli.Framework
{
public static class UnityEventExtensions
{
[System.Diagnostics.Conditional("DEBUG")]
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityToolbarExtender;
/// <summary>
using UnityEngine;
namespace Giacomelli.Framework
{
/// <summary>
/// #unitytips: Sprites Collection - http://diegogiacomelli.com.br/unitytips-sprites-collection/
/// </summary>
public static class SceneViewInput
{
public static bool GetKeyDown(KeyCode key)
using System.Reflection;
using UnityEngine;
using UnityEngine.Experimental.Rendering.Universal;
/// <summary>
/// unitytips: ShadowCaster2DFromCollider Component
/// http://diegogiacomelli.com.br/unitytips-shadowcaster2-from-collider-component
/// <remarks>
/// Based on https://forum.unity.com/threads/can-2d-shadow-caster-use-current-sprite-silhouette.861256/
/// </remarks>
using UnityEngine;
/// <summary>
/// Drawing a Maurer Rose With Unity - http://diegogiacomelli.com.br/drawing-a-maurer-rose-with-unity
/// </summary>
[RequireComponent(typeof(LineRenderer))]
public class MaurerRoseLineRenderer : MonoBehaviour
{
const int PointsCount = 361;
using UnityEngine;
namespace Giacomelli.Framework
{
public class FrameworkSettings : ScriptableObject
{
[SerializeField]
bool _entityLogEnabled;
[SerializeField]
@giacomelli
giacomelli / HelpBoxAttribute.cs
Last active July 14, 2020 10:31
#unitytips: HelpBox Attribute (with docs button)
using UnityEngine;
using System;
namespace Giacomelli.Framework
{
public enum HelpBoxType
{
/// <summary>
/// <para>Neutral message.</para>
/// </summary>
@giacomelli
giacomelli / SocialShare.cs
Last active July 7, 2020 12:43
SocialShare component using NativeShare plugin (https://github.com/yasirkula/UnityNativeShare)
using System;
using System.IO;
using UnityEngine;
namespace Giacomelli.Framework
{
public class SocialShare : MonoBehaviour
{
[SerializeField]
string _title;
using UnityEngine;
/// <summary>
/// Dynamic Log - http://diegogiacomelli.com.br/unitytips-dynamic-log
/// </summary>
public class DynamicLog : MonoBehaviour
{
[SerializeField]
string _format;