Skip to content

Instantly share code, notes, and snippets.

@eriseven
eriseven / protobuf-250-on-mac.sh
Last active January 19, 2024 10:52 — forked from peterroth/protobuf-250-on-mac.txt
How to install protobuf 2.5.0 on Mac (10.15.7, Catalina). brew required!
brew install automake libtool wget
wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2
tar -xvjf protobuf-2.5.0.tar.bz2
cd protobuf-2.5.0
./autogen.sh
./configure
make; make check
sudo make install
Validate the successful installation:
#if UNITY_PURCHASING
#if UNITY_ANDROID || UNITY_IPHONE || UNITY_STANDALONE_OSX || UNITY_TVOS
// You must obfuscate your secrets using Window > Unity IAP > Receipt Validation Obfuscator
// before receipt validation will compile in this sample.
//#define RECEIPT_VALIDATION
#endif
//#define DELAY_CONFIRMATION // Returns PurchaseProcessingResult.Pending from ProcessPurchase, then calls ConfirmPendingPurchase after a delay
//#define USE_PAYOUTS // Enables use of PayoutDefinitions to specify what the player should receive when a product is purchased
@eriseven
eriseven / exportOptionsAdHoc.plist
Created November 17, 2022 09:43 — forked from cocoaNib/exportOptionsAdHoc.plist
Xcode build with exportOptionsPlist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>ad-hoc</string>
</dict>
</plist>
@eriseven
eriseven / For Mac 4.2.6 unlimited trial.md
Created July 18, 2022 06:27 — forked from rise-worlds/For Mac 4.2.6 unlimited trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher,4.2.5,4.2.6,4.3.7,it's works , this is the way which makes Always in evaluation mode 。

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+u BCompare : touch BCompare && chmod a+u BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@eriseven
eriseven / .gitattributes
Created February 28, 2022 14:59 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@eriseven
eriseven / AndroidKeystoreAuthenticator.cs
Created February 25, 2022 05:41 — forked from sttz/AndroidKeystoreAuthenticator.cs
Unity editor script that stores Android Keystore passwords in the macOS Keychain.
using System;
using System.IO;
using UnityEditor;
using UnityEditor.Build;
using UnityEngine;
#if UNITY_EDITOR_OSX
/// <summary>
/// Unity clears Android Keystore and Key Alias passwords when it exits,
@eriseven
eriseven / addingIOSCapability.md
Created December 17, 2021 03:33
[Unity, iOS] Adding iOS Capability via Script

Adding iOS Capability via script

Overview

iOS' capability setting can be modified by Unity Editor script.

I'm using Jenkins build machine. And sometimes the xcode project's capability settings modified. So, I need to add below script to add capabilities automatically.

The following script let you add capabilities for what you want to use. See also apple developer document to see what kind of capability you can use.

@eriseven
eriseven / FindByGuid.cs
Created May 25, 2021 03:46 — forked from partlyhuman/FindByGuid.cs
Unity Find by GUID
using UnityEditor;
using UnityEngine;
namespace com.hololabs.editor
{
public class FindByGuid : EditorWindow
{
[MenuItem("Utility/Find Asset by Guid %&g")]
public static void DoFindByGuidMenu()
{
@eriseven
eriseven / LoadAB.cs
Created May 19, 2021 14:31 — forked from tsubaki/LoadAB.cs
Load Multiple Sprite
using UnityEngine;
using System.Collections;
using System;
public class LoadAB : MonoBehaviour {
IEnumerator Start ()
{
enabled = false;
WWW www = new WWW ("file://" + Application.streamingAssetsPath + "/player");