unitycommunity / unitylibrary Goto Github PK
View Code? Open in Web Editor NEW:books: Library of all kind of scripts, snippets & shaders for Unity
Home Page: https://unitycommunity.github.io/UnityLibrary/
License: MIT License
:books: Library of all kind of scripts, snippets & shaders for Unity
Home Page: https://unitycommunity.github.io/UnityLibrary/
License: MIT License
Hi.
We can use codesponser.io to fund this project for the hard work.
I would be happy to hear your opinions about this idea.
Thanks.
I have created a new branch called gh-pages that will host the website for the UnityLibrary.
I think this way, we can provide visitors some examples on how to use the scripts that form the library.
NOTE: Theme is still pending for approval.
Please include here your opinions on what to include in the web.
Hi.
I have found some Unity types such as Vector3, Quaternion, ... does not support serialization, while we need to serialize them.
So, it is good idea to make an serializable version of them. for example Vector3Serializable.
Here is a simple example using SerializableAttribute: (Have a look at examples link at below to get idea)
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public struct Vector3Serializable {
public float x;
public float y;
public float z;
// Place Constructors
// Do implicit conversion between Vector3 and Vector3Serializable
}
Or by using ISerializable interface.
Now, the list of types that we can make:
Also, we can add some more serializable custom types such as SerializableDictionary, SerializableCollection or SerializableList.
Or even some custom classes such MyCustomType.
Also there might be some unserializable types in System types.
Thanks.
Hi.
If someone wants to include the whole library in it's own project, there might be some name collisions. or even one script might throw name exceptions.
So it is good idea to choose a namespace for all of the UnityLibrary scripts and commit the namespace to all of them.
I recommend UnityLibrary namespace for all scripts.
Any suggestions for namespace name is appreciated.
If all accept it, we will go to add namespace to all scripts.
Thanks.
When I'm opening the project in a version, which is mentioned in ProjectSettings/Projectversion.txt file, it has 1 error:
Assets/Scripts/Editor/ContextMenu/GetVideoAspectRatioEditor.cs(22,36): error CS1061: Type
UnityEngine.Video.VideoPlayer' does not contain a definition for
height' and no extension methodheight' of type
UnityEngine.Video.VideoPlayer' could be found. Are you missing an assembly reference?
Hi.
Is it a good idea to move the whole library files such as shaders, scripts, ... to a new empty unity project?
It makes our works easier and we can check our scripts together.
If you accept it, i will do it.
Thanks.
Hi.
We need to update the below shaders:
DebugNormalsTangets
Equirectangular
LerpColorNearToFarPlane
VertexColorMesh
UnlitFakeCurved
If you found any old shader please post it here.
Thanks.
A good idea could be to create a new separate repository that uses Github pages as a blog for community members that could be used to include useful tutorials or announcements for the community.
Glass, Gaussian, Radial, ... Blur Shaders.
We can add complete blur shaders for using in UI and in game objects.
You can find pre-made blur shaders on unity assetstore, but we needed a free and complete blur shader that everyone can use.
Any more suggestions are welcome.
Thanks.
@EmpireWorld can you check if this is better, then can replace with it?
// current
https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Scripts/Utilities/Singleton.cs
// better?
https://gist.github.com/lordlycastle/64821426eedf222e66218f70e2498757
Hi.
I have checked the files inside of this repository but i didn't find anything that contains Contribution guidelines.
GitHub provides a special file for this named CONTRIBUTING
, plus CODE_OF_CONDUCT
.
You can add these files to the repository to let people contribute and collaborate with this project.
Thanks.
Hi.
Here is the list of scripts to be updated:
GrabDesktop.cs
ColorCorrectionCurvesLayers.cs
GrayscaleLayers.cs
RandomTiles
If you found any old script, please post it here.
Thanks.
see this and some others, lots of empty lines:
https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Shaders/2D/Effects/Glow.shader
Currently the README file of this repository doesn't contain a logo for the library. It could be great to have a custom logo for our repository and give it more visibility.
(can post requests here)
Some ideas for now
would need batching support for sprite drop shadow, if possible?
https://forum.unity.com/threads/drop-shadow-shader-for-sprites.449123/#post-5969147
Hey guys :),
My question was if I can use the line drawing for my android app and how?
Greetings,
Kristina
Javascript support has been deprecated in Unity3D as a programming language (note that I'm not pointing to Javascript plugins when you export for WebGL platform). So script templates should be removed from the library or move them to a legacy folder.
Hi.
We need to add some useful tutorials and articles to Wiki to make it even more useful.
Also we can collect useful posts, articles from the internet and unity community and gather all of them all in one wiki.
A good resource is the ๐ด Unity Official Wiki, there are plenty of old utilities and tutorials that can be updated and added to our wiki.
Also we post tips & tricks to the Wiki, Everyone has it's own tricks, what if everyone have all tricks? it will be nice. ๐
EDIT: It seems the Unity Official Wiki is down these days. so you can use Internet Archive.
Unity Offical Wiki at Internet Archive
Thanks.
How about contributing the mobile resolution response script I made?
The camera is sized to fit the mobile environment.
Does it already exist?
Althougt code can be commented in the scripts, could be great to generate automatic documentation for the scripts and host it in the gh-pages branch of this repository.
In this way we can have a presentation web for the library and also the related documentation on how the API works.
I have checked DocFX and it seems it's possible to implement the pipeline for hosting the documentation as stated. See it here.
DocFX is just an example, but if you find another better solution we could use it too.
Hi.
We need to test our scripts in Play Mode and Edit Mode using Unity Test Runner to make our scripts stable for public usage.
We have Editor/Tests folder for adding test scripts, so make a new test script for each script to tests it's functionally.
Also, we should test them ourselves by interaction tests.
Thanks.
for assetbundleloader, https://github.com/UnityCommunity/UnityLibrary/blob/master/Assets/Scripts/AssetBundles/AssetBundleLoader.cs
can use this to clear other cached versions, as mentioned here:
https://forum.unity.com/threads/asset-bundles-with-multiplatform-on-dev-live.494371/#post-3217355
This shader works like a charm!! The only thing that looks weird is when I rotate a sprite, then the direction of the shadow is wrong, is there a way to incorporate this into the shader so that the shadow is always in the same direction?
from
https://forum.unity.com/threads/drop-shadow-shader-for-sprites.449123/#post-4737314
cc @smkplus
I would like to submit this interesting CommandBuffer+Stencil example but the current folder structure does not have a place for multiple file types.
I was thinking about creating a "Projects" folder and add a whole unity project to it (with the contents of the unitypackage from the example).
Does anyone suggest a different approach?
Update project version to the latest LTS version?
Follow Utility.
We should be able to attach it to any object that we want follows another object.
This follow script can have these settings:
public enum FollowType {
MoveTowards,
Lerp,
Slerp,
SmoothDamp,
Acceleration
}
EDIT: Acceleration movement http://answers.unity3d.com/answers/29757/view.html
Any more suggestions are welcome. ๐
Looking for Rigidbody2D follow script? Find it at #13
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.