Skip to content

Instantly share code, notes, and snippets.

View javier-games's full-sized avatar

Javier García javier-games

View GitHub Profile
@javier-games
javier-games / iOSHomeButton.cs
Last active September 29, 2024 01:53
Helps to modify the iOS home button parameters for each new scene or canvas on awake, you may consider add just one instance per scene.
using UnityEngine;
#if UNITY_IOS
using System.Collections.Generic;
using UnityEngine.UI;
#endif
/// <summary>
/// iOS Home Button.
///
@javier-games
javier-games / chat-gpt-slack-bot.py
Created December 25, 2022 03:00
Enable chatGPT as chatbot on slack.
import os
import openai
from slack_sdk import WebClient
from slackeventsapi import SlackEventAdapter
from flask import Flask
# To create a chatbot on Slack, you will need to do the following steps:
#
# - Go to the Slack API website and sign in to your Slack account. Click on the "Start Building" button in the top
@javier-games
javier-games / .gitattributes
Last active September 29, 2024 01:58
Git Attributes for Unity and LFS
# 3D
*.fbx filter=lfs diff=lfs merge=lfs -text
*.FBX filter=lfs diff=lfs merge=lfs -text
*.dae filter=lfs diff=lfs merge=lfs -text
*.dxf filter=lfs diff=lfs merge=lfs -text
*.obj filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.lxo filter=lfs diff=lfs merge=lfs -text
@javier-games
javier-games / AudioSampler.cs
Last active October 10, 2024 09:14
A Unity experiment for seamless dynamic music changes in games, using Scriptable Objects to trigger transitions without noticeable shifts in the soundtrack. Try it at https://javier-games.itch.io/smplsmplr
using UnityEngine;
namespace SmplSmplr.Scripts.AudioSamples
{
/// <summary>
/// Defines a section of an audio clip and whether is a loop or not.
/// </summary>
[CreateAssetMenu(fileName = "Audio Loop", menuName = "Audio/Audio Loop")]
public class AudioSampler : ScriptableObject
{