This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Maintains a renamed copy of certain Unity Resources asset files in your project. | |
// E.g. by default Unity won't include SVG files as XML for further processing. | |
// | |
// Put this file in the Assets/Editor folder. | |
// | |
// This script automatically rename resource files with a .txt (text) or .bytes (binary) extension, | |
// to be readable as Resources.Load<TextAssets>(path).text or Resources.Load(path) as byte[]. | |
// | |
// | |
// License: CC0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Attach this to any GameObject in the first scene loaded (e.g. the camera). | |
* | |
* You can use Charles Proxy to monitor network calls from your game https://support.unity3d.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity | |
* | |
* You shouldn't need this if Analytics is disabled in the Services window (which does the same thing as the old Disable HW Stats flag in earlier versions of the Unity Editor). The Analytics Package is not used if Analytics is not enabled. | |
* | |
* Ref: | |
* https://forum.unity.com/threads/unity-iap-without-analytics-for-kids-games.689143/ | |
* https://forum.unity.com/threads/what-happened-to-disable-hw-statistics.961060/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if DEBUG | |
if (@available(iOS 16.4, *)) { | |
self.webView.inspectable = true; | |
} | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<!-- | |
This replaces the SELECT dropdown menu with an editable INPUT textbox, | |
when the last ('other') option is selected from the list. | |
This version allows adding this functionality to multiple SELECT elements. | |
(See the 'setupEditableSelectElement' method.) | |
Note that this may not be a good fit when supplying both display values and raw values, | |
as evidenced by the 'spanish' option, for example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<!-- | |
This replaces the SELECT dropdown menu with an editable INPUT textbox, | |
when the last ('other') option is selected from the list. | |
Note that this may not be a good fit when supplying both display values and raw values, | |
as evidenced by the 'spanish' option. | |
By Andrew Kingdom (C) 2023 all rights reserved. MIT License. | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Try transforming a shared link from Google Drive to a Google Drive raw link. | |
// | |
// Caveat - this is to show what needs replacing - ideally the replace should be done via REGEX or similar if more flexibility is needed. | |
// MIT license - Copyright Andrew Kingdom 2023 all rights reserved. | |
// | |
// | |
- (void)example { | |
NSString serverDataURLString = @"...yourgoogledriveurl..."; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Demonstrates Swift-based reflection concept like Key-Value coding in Objective-C (but slower) | |
// and use of @dynamicMemberLookup. | |
// | |
// Uses Mirror to reference a property in a class or struct by string key name; | |
// Uses @dynamicMemberLookup to get the name of a property as a string, to reverse the reflection. | |
// | |
// DynamicMemberLookupExample.swift | |
// | |
// Copyright Andrew Kingdom 2023-05-17. | |
// MIT License |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Format Objectives | |
1. Suitable for editing by humans, especially those with minimal technology skills. | |
2. Readable by computers. | |
3. Readability by humans is preferred over reducing file size. | |
# Basic Format | |
* The basic line format is a name, some space(s) and a value. | |
* A record starts with RECORD or # (then an optional identifier). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of printing a source code line at an error position | |
// (based on an index within the entire source code) | |
// | |
// By Andrew Kingdom | |
// MIT license | |
// (and use at own risk) | |
// | |
// Example prints: | |
// | |
// DEFGH |