Skip to content

Instantly share code, notes, and snippets.

View marcotmp's full-sized avatar

Marco marcotmp

View GitHub Profile
@marcotmp
marcotmp / UnityGMail.cs
Last active August 28, 2025 10:04
Code to send email from unity using a Google account.
using System.ComponentModel;
using System.Net;
using System.Net.Mail;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
public class UnityGMail
{
public void SendMailFromGoogle()
{
using UnityEngine;
// Attach this code to the camera
public class CameraEffect : MonoBehaviour
{
public Material m_renderMaterial;
void OnRenderImage(RenderTexture source, RenderTexture destination)
{
Graphics.Blit(source, destination, m_renderMaterial);
@marcotmp
marcotmp / HandleMultipleButtonsListeners.cs
Last active August 3, 2021 21:07
Handle listeners for multiple buttons in Unity
[SerializeField] private Button[] buttons;
private ListenerHandler[] listeners;
public class ListenerHandler
{
public int id;
public void Call() => onCall?.Invoke(id);
public Action<int> onCall;
}