Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
UnityCoder
by mgear
2w ago
Testing about creating Scene Preview image from Scene Camera view, when scene is saved and then display that preview image when scene is selected! Resources: – https://docs.unity3d.com/ScriptReference/SceneManagement.EditorSceneManager-sceneSaved.html – https://docs.unity3d.com/ScriptReference/Editor.OnPreviewGUI.html Forum thread: (where i got the idea to try) https://forum.unity.com/threads/2024-and-still-no-snapshot.1575175/ Source: https://gist.github.com/unitycoder/b740b9db92e454d83ade8528d5e1f382 VIDEO: (making of) New: One other alternative, can use RenderStaticPreview to render that ..read more
Visit website
Webgl+javascript TTS
UnityCoder
by mgear
1M ago
Quick TTS test, uses jslib to call js SpeechSynthesisUtterance. sample project: https://github.com/unitycoder/webgl-js-TTS webgl demo: https://unitycoder.com/upload/demos/webglTTSjs/ References: https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html ..read more
Visit website
Using Moonsharp (LUA) + Unity Webgl
UnityCoder
by mgear
1M ago
Moonsharp has some issues in webgl builds, but here’s working repo and some notes. REPO ( unity 2022.3.7f1 ) – https://github.com/unitycoder/MoonSharpWebGL WEBGL DEMO – https://unitycoder.com/upload/demos/moonsharpwebgl/ NOTES – You need to grab this webgl fix: https://github.com/moonsharp-devs/moonsharp/pull/146 – You need to do hard wiring (or at least i didn’t get the link.xml file to work properly) https://www.moonsharp.org/hardwire.html ) – And the call that class initialize, to keep it from getting stripped (i have that code inside Interpreter.cs Start() now ..read more
Visit website
Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
UnityCoder
by mgear
1M ago
Steps Customize your project template package.json file (using 7zip in Administrator mode) Project templates are inside Unity editor installation folder (like: 2022_3\Editor\Data\Resources\PackageManager\ProjectTemplates\) Example package.json here to add video (and hide default preview image) https://gist.github.com/unitycoder/cc472faec83f4941d032e2010ce889ea Remember to close Hub completely (so that it reloads packages) Whats happening? This line has HTML & CSS inside description and Unity hub renders them.. The CSS is for hiding default project template thumbnail. "description": "Some ..read more
Visit website
Check if point is inside polygon 2D (using line intersection)
UnityCoder
by mgear
2M ago
Info: “Each time the ray crossed the boundary of the polygon, it would cross from the interior to the exterior, or vice versa. Therefore, the test point is on the interior if, and only if, the ray crosses the boundary an odd number of times“ https://www.topcoder.com/thrive/articles/Geometry%20Concepts%20part%203:%20Using%20Geometry%20in%20Topcoder%20Problems Tested the algorithm above and seems to work! : o Source: https://gist.github.com/unitycoder/e769e6e7f4d0ee50f983d1265e6f15d9 Line Intersection method: https://forum.unity.com/threads/line-intersection.17384/#post-4442284 Note: Unity ha ..read more
Visit website
UnityHub: Enable Create Project Button (without having to select Cloud Organization)
UnityCoder
by mgear
2M ago
Info: https://github.com/unitycoder/UnityHubModding ..read more
Visit website
UI: Make Tooltip background fit Text content length
UnityCoder
by mgear
2M ago
Add UI/Panel as background Set pivot to Top Left Add Text as Child of the Panel Add Content Size Fitter to Panel Add Horizontal Layout Group to Panel (Enable: Control Child Size: [x] Width, [x] Height, Child Force Expand: [x] Width, [x] Height) Content size fitter: Horizontal Fit: Preferred Size, Vertical Fit: Unconstrained (if you want 1 line only) or Preferred Size for multiline) Set some text value to child text component, Panel should resize to it ..read more
Visit website
Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub)
UnityCoder
by mgear
3M ago
I just wanted to build Quest 3 XR demo apk quickly.. but ended up fighting with android sdk installations. STEPS You need to have android sdk already (the older version, you can try this: https://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip *i’m using this https://www.dropbox.com/s/aqze528vj59ka7i/android-sdk-with-sdk-manager.7z?dl=1 ) optionally: check if this works or helps, https://stackoverflow.com/questions/43685301/how-to-install-the-gui-android-sdk-manager-without-installing-android-studio/51429889#51429889 download jdk-11.0.14 from https://www.oracle.com/java/techno ..read more
Visit website
UnityHub: Add support for custom project titles (instead of folder name)
UnityCoder
by mgear
4M ago
This request has been open since 2018.. https://forum.unity.com/threads/renaming-projects.514061/ So had to test it myself and seems to be really simple (*** as a proof of concept, i don’t know it the Title value affects something else) Steps: Unpack app.asar from Hub folder (using 7zip Asar plugin) rename old app.asar as app.asar.bak Open app/ folder in VSCode/VSStudio (need to run as an Admin) Open localProject.js Add this line at top (near other definitions) const kPCustomNamePath = path.join(ProjectSettingsFolderPath, ‘ProjectName.txt’); modify getProjectData(projectPath) method Add these ..read more
Visit website
Testing Unity MUSE AI
UnityCoder
by mgear
5M ago
video clip: links: – https://unity.com/products/muse/onboarding ..read more
Visit website

Follow UnityCoder on FeedSpot

Continue with Google
Continue with Apple
OR