2019

Unity - Markdown Render for UIWidgets

New unity plugin has been released:
https://youtu.be/5Q6qpgveYgA

What is UIWidgets?

UIWidget is a Unity Package which helps developers to create, debug and deploy efficient, cross-platform Apps. Details could be found at their github page

What does this plugin do?

Just parse and render raw markdown strings into UIWidgets elements.

How to use

    1. You must learn how to use UIWidgets first
    1. Import UIWidgets into your Unity project according to Requirements
    1. Then import this plugin into your Unity project

review

Webview in Unity

Recently I war working on creating a blog app by using Unity UIWidgets, actually it's not bad.
But when I click on the page's link, it refered to phone's system browser. It's not what I wanted.

So I found some webview solutions for Unity. Below is what I'm using.
https://github.com/gree/unity-webview

Why did I choose this one?

  • It was the first one working on my iPhone
  • It could work in MacOS Unity Editor, it is so wonderful that I could debug directly in my Editor.

How to use

  • Before use it directly, I wrapped it with below's code.
    public class WebViewManager : MonoSingleton<WebViewManager>
    

review

Unity - CoroutineExecutor

Simple class for executing Coroutine easily


using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;



public class CoroutineExecutor : MonoBehaviour
{

    public System.Action DoneCallback;

review

Unity - Assets Checker Plugin

My Unity Plugin published: Asset Checker

1. This tool is developed for checking assets in game project with error or not best practice importing settings

2. Currently Checked Assets Type

  • Texture2D
    • Texture file size
    • Dimensions
    • Read/Write enable
    • Generate mipmap enable
  • AudioClip
    • Large audioclip using Streaming loadtype
    • Force mono
  • Font

review

Unity Scale around

From Scale around points similar to rotate around


    public static void ScaleAround(Transform target, Vector3 pivot, Vector3 newScale)
    {
        Vector3 A = target.localPosition;
        Vector3 B = pivot;

        Vector3 C = A - B; // diff from object pivot to desired pivot/origin

        float RS = newScale.x / target.localScale.x; // relative scale factor

        // calc final position post-scale

review

Unity Find References

Find references in Assets:


[MenuItem("Assets/Find Refereces")]
public static void FindReferences()
{
    EditorSettings.serializationMode = SerializationMode.ForceText;
    string path = AssetDatabase.GetAssetPath(Selection.activeObject);
    if (!string.IsNullOrEmpty(path))
    {
        string guid = AssetDatabase.AssetPathToGUID(path);
        List<string> withoutExtensions = new List<string>() {".prefab", ".unity", ".mat", ".asset"};
        string[] files = Directory.GetFiles(Application.dataPath, "*.*", SearchOption.AllDirectories)

review

Unity Event Class

EventTriggerListener


using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;

public class EventTriggerListener : MonoBehaviour, IPointerClickHandler, IPointerDownHandler, IPointerEnterHandler,
    IPointerExitHandler, IPointerUpHandler, IDragHandler
{
    public delegate void VoidDelegate1(GameObject go, PointerEventData eventData);

review

My blog’s markdown tools

I'm using marked and highlight in my blog.

Below is how to use:


var marked = require('marked');
marked.setOptions({
    highlight: function (code) {
        return require('highlight.js').highlightAuto(code).value;
    }
});

review

Unity3d ResourcesManager

Singleton from https://www.suntabu.com/page/?d=1512300646985



using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Assertions;
using UnityToolbag.Singleton;

public class ResourcesManager : Singleton<ResourcesManager>
{
    private ResourcesManager()

review

Unity3d AudioManager

ResourcesManager from https://www.suntabu.com/page.html?d=1552226655668


using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
using UnityEngine.Assertions;

public class AudioManager : MonoBehaviour
{
    /// <summary>
    /// cached audiosource componets list. 

review