Skip to content

Instantly share code, notes, and snippets.

@andybak
andybak / _Instructions.md
Last active June 21, 2025 10:41
A simple tidy workflow for handling external 3rd party code in Unity 2018
  1. Look on https://github.com/UnityAssetPackages to see if we've added the repo you want to use.
  2. Check if it's been updated reasonably recently. If not nag us to pull the upstream changes.
  3. If it doesn't have a fork on UnityAssetPackages then you can sumbit an issue and we'll add it, you can volunteer to join our org and do it yourself - or if you're in a hurry just fork it to your own Github (or Gitlab or whatever) account.
  4. Make a note of the url used to clone the repo.
  5. Run example.sh= in the root directory of your main project to add the submodule to your repo.
  6. Use the https form of each git url if you want people who don't have commit rights to be able to use your main repo
  7. Add a package.json to the external repo in the first directory you wish to include in your project (i.e. either Assets or a subdirectory of Assets) The example below shows you what to put in that file. The only really critical bit is the name - it needs to be unique to the project and match what you put in manifest.json
[('2eNa6VGOnP-', '739yKEQQnPQ'), ('2WZaZTqeZXv', 'siGv67cqpiI'), ('cHKu2OzFcLw', 'y5N56Xe0BnE'), ('3W66J3lnzOJ', '1Uxqx7182pY'), ('54DKxZGOS3C', 'b5WLyjQH6VY'), ('c8b_JkBUCJ4', 'vBkuHap-huQ'), ('dz_yWlf_i5c', 'gxwT5QXDWI4'), ('bw5xa04ywtT', 'CHoO59epUQg'), ('9Y9A-Xukuy_', 'UOskT2Phkm8'), ('3cMdeN9dMml', 'qOFI9Wbpbgg'), ('8iONSvM6YqE', '4TzULZ7XEGQ'), ('e4hCF5i6F5p', 'JSQK5cFKwSc'), ('9910H6opOhx', '7iL0wG9dNSg'), ('5JT3vDcL1sw', 'Ihblnbc0n8w'), ('fbn03ETNxUO', 'NZEintxNfig'), ('0QCaZOR0mDw', 'wDkX-qsy4H8'), ('d8dhxgO5XOV', 'r59_u9jixQ0'), ('8cHnd8vO7Ok', '3dHSld0YS_w'), ('bVA5OaJBIXG', 'CxcfLehivds'), ('e8r0fdlpFpy', 'TCPsRRTUqi0'), ('7LXfWUafEJl', 'HFnwEkWkUls'), ('7CLIJ93we8m', 'ukb566dA3Vo'), ('0ZTOm-AQLTu', 'RuX60l4Q6wE'), ('8tqx4tS_n9b', 'AsMthXhJM74'), ('cZlRJOGW6dF', 'xn0t3BwMsZs'), ('2XoIhekeQ8L', '9d2HcWzObWk'), ('1JmsNk8-NLq', 'Y1UEfj_Er3o'), ('fQ8uUkrDt3g', 'RLlp2SRBp5U'), ('dUyhvOPR7-H', 'HisNWQ6VYlo'), ('bAxvEmhGq-t', 'uBO90HYdxTI'), ('c1tWS_N389e', 'BLOQYxe22m4'), ('0Bwcq-oVZCY', 'D_vFtAtgotY'),
@tool
extends EditorScenePostImport
var MATERIAL_REPLACEMENTS := {}
var TEXTURES := {}
func _init():
setup_textures()
setup_materials()
{
"basePath": "",
"baseUrl": "https://poly.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Poly Service",
"description": "The Poly API provides read access to assets hosted on poly.google.com to all, and upload access to poly.google.com for whitelisted accounts. ",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/poly/",
"fullyEncodeReservedExpansion": true,
"icons": {
import datetime
import json
import math
import os
import re
from pprint import pprint
LIMIT = 10
@andybak
andybak / __init__.py
Last active December 16, 2024 11:14
Generic server listener for Blender
# __init__.py
bl_info = {
"name": "Icosa Listener",
"blender": (4, 0, 0),
"description": "Allows Icosa Gallery to import models into Blender",
"version": (1, 0),
"author": "@icosa.gallery",
}
import bpy
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
import datetime
import json
import math
import os
import re
EMBED_DIR = "c:\\poly_html\\poly.google.com\\view"
JSON_DIR = "c:\\poly_megajson\\poly.google.com\\view"
GLTF_DIR = "C:\\poly_updated_gltf\\poly.google.com\\view"
{
"asset": {
"version": "2.0",
"generator": "Mozilla Spoke dev"
},
"scenes": [
{
"nodes": [
2,
3,