The WindowAction attribute allows you to add global actions to the windows (items in the generic menu or extra buttons).
This file contains hidden or 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
| /* | |
| LICENCE -> MIT License | |
| AUTHOR -> Lukas Fratzl | |
| GIT -> https://github.com/LukasFratzl | |
| DESCRIPTION -> My implementation of "Marching Cubes" in Unity with Burst and Multithreaded with c# Jobs | |
| the algorithm is smart enough to generate every "Grid Size" with every wanted "Resolution" | |
| as extra with a "Smooth" or "Flat" normal generation | |
| USAGE -> Assign all field and allocate the Native Containers, Schedule the Job and Complete it | |
| When you don't know how the mesh is created just watch this Gist -> https://gist.github.com/LukasFratzl/988f1c9736b43684deb319880ac6c6fc |
This file contains hidden or 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
| /* | |
| LICENCE -> MIT License | |
| AUTHOR -> Lukas Fratzl | |
| GIT -> https://github.com/LukasFratzl | |
| DESCRIPTION -> My implementation of "Marching Cubes" in Unity with Burst and Multithreaded with c# Jobs | |
| the algorithm is smart enough to generate every "Grid Size" with every wanted "Resolution" | |
| as extra with a "Smooth" or "Flat" normal generation | |
| USAGE -> Assign all field and allocate the Native Containers, Schedule the Job and Complete it | |
| -> SEE EXAMPLE JOB DOWN BELOW! | |
| GENERATE SPEED -> RESOLUTION 32 -> 26.9 ms | 27 024 Vertices | 1 CHUNK |
This file contains hidden or 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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEditor; | |
| using System; | |
| using System.Reflection; | |
| [CustomEditor(typeof(GameObject), true)] | |
| [CanEditMultipleObjects] | |
| public class CustomGameObjectInspector : Editor |
This file contains hidden or 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
| public interface IApplicationService : IService | |
| { | |
| HashSet<string> GetValidScenes(); | |
| void Load(string sceneName, Action<string, float> onProgress, Action<string> onComplete); | |
| void Unload(string sceneName, Action<string, float> onProgress, Action<string> onComplete); | |
| void Quit(); | |
| } |
Proof-of-concept to download a file from a URL and save it locally. For example, I may wish to retrieve a JAR file from Nexus.
Uses the http package, which does the basics with raw HTTP protocol support.
Possible update: use request, it is like the Python's requests library. There is a companion package called node-request-progress that tracks download progress. See request-progress on GitHub.
Note: The request package has been deprecated.
This file contains hidden or 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
| /// For this to work you need to copy these 2 files: | |
| /// "YOUR UNITY LOCATION"\Editor\Data\Mono\lib\mono\X.X\System.Drawing.dll | |
| /// "YOUR UNITY LOCATION"\Editor\Data\Mono\lib\mono\X.X\System.Windows.Forms.dll | |
| /// ..to a "Plugins" folder within your project | |
| /// | |
| /// For this example to work, you need to have a (UI) Canvas object in your scene | |
| /// Put this script on any object | |
| /// | |
| /// Tested on windows, not sure if it works on any other platform | |
| /// |
This file contains hidden or 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
| using UnityEngine; | |
| using System.Collections.Generic; | |
| public class ComponentGrabber : MonoBehaviour | |
| { | |
| [SerializeField, HideInInspector] | |
| string searchTerm, filter; | |
| [HideInInspector] | |
| public List<Component> curSelection = new List<Component>(); |
This file contains hidden or 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
| using System.Collections.Generic; | |
| using System.IO; | |
| using UnityEditor; | |
| using UnityEditorInternal; | |
| using UnityEngine; | |
| // This is only useful for spritesheets that need to be automatically sliced (Sprite Editor > Slice > Automatic) | |
| public class AutoSpriteSlicer | |
| { | |
| [MenuItem("Tools/Slice Spritesheets %&s")] |
This file contains hidden or 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
| using UnityEngine; | |
| /// <summary> | |
| /// Small helper class to convert viewport, screen or world positions to canvas space. | |
| /// Only works with screen space canvases. | |
| /// </summary> | |
| /// <example> | |
| /// <code> | |
| /// objectOnCanvasRectTransform.anchoredPosition = specificCanvas.WorldToCanvasPoint(worldspaceTransform.position); | |
| /// </code> |
NewerOlder
