-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Mohsin Khan edited this page May 13, 2024
·
22 revisions
A boilerplate project that many games could take advantage of. As it is a basic Unity project to start with. I used some portions of it in my game projects, now writing it so that it's more usable in projects to come.
Also, It is structured properly with the namespace that it would not conflict with your code at any time.
Module/Feature list: TOP
- Singleton - generic singleton which can be used to implement managers
- TaskQueue - allows you to execute the tasks in Queue, without interrupting the previous task
- SceneController - which should be used to switch scenes
-
ReportEmail - email reporting module which allows you to mail console data to a given email address. Also you can test it in
Editor
-
OTPEmail - send OTP on passed Email from client side. Also you can test it in
Editor
- TimeElapse - restrict game to send too frequent server calls, delay to update according to given delay
- GameLogger - allows you to log with a lot of features like color, timestamp, italics, bold, etc.
- MonoExtension - includes a lot of extension methods like InvokeExtension, UpdateExtension, AlphaFade etc.
-
CountDown - using
IEnumerator
display timer which can set in Text/TMP_Text component and also returns the text with a boolean saying still counting or not -
CountDownUpdate - using
Update
display timer which can set in Text/TMP_Text component, returns the text with a boolean saying still counting or not and with remaining time - ToggleBehaviour - allows you to enable & disable components, especially use it in your UIs
- CanvasHelperCustom - for notch devices, better to have the safe area to be used in UI
- WebAudioClip - allows you to download audio file from given URL
- WebData - allows you to download text data from given URL
- MonoDirect - Deprecated due to ECS - solution to Monobehaviour function callbacks (called through reflections) which can be slow in most cases and could be the reason for lag
Editor Module/Feature list: TOP
- ButtonTMPExtension - extended Button component with TMP_Text and Animator field added
- TextExtension - extended Text component with text Id and Animator field added
- ToggleExtension - extended Toggle component to add support for Text and TextExtension to edit text of Toggle, Animator
- ToggleInputExtension - extended Toggle component to add support for InputField, Animator
- SliderTMPExtension - extended Slider component to add support for Label to edit TMP_Text of Slider, Value and Animator
- Anchors selected UI to corners
- RectTransformExtensions
- Anchors selected UI to corners
- Find gameObjects which have missing scripts
- Find nested gameObjects which have missing scripts - recursively
- Pivot set
Mini Useful/Handy Functions list: TOP
- GameUtilities
- Enum parsing from string and int
- Find mid-Point of passed two vectors
- Parabolic path of the passed source and destination vector
- Get Supported RenderTextures list
- Get Supported Alpha RenderTextures list with formats
- Utility
- JSON Conversions From/To JSON
- Time in seconds
- Unix Time
- Get passed time from now
- Get current timestamp in milliseconds
- Get time from now
- Time difference in seconds
- Convert time in seconds (double) into words
- Add days, hours, minutes, seconds in milliseconds
- Convert seconds to milliseconds and vice versa
- Date is already passed or not
- File existence at persistent data path
- Get persistent data path
- Get streaming assets path
- Remove children of the passed transform
- Disable children of the passed transform
- Disable GameObjects from the passed list
- Get Active Object from the list
- Get Active object from the list, if none then create one
- Get sprite from Texture2D
- Rotate Increment
- Valid email check using MailAddress class
- Valid email check for format using regex
- Internet connection check
- MiscExtension
- Case-sensitive string comparison
- Concatenate string with StringBuilder
- Get the first character of the sentence
- First part of string till defined separator
- Get file name without extension
- Reverse the passed string
- String is new in the list
- Add prefix to list
- Restrict text to limit
- Round decimal digits till specific digits after zero
- Check is Server codes
- Highlight text with bold or colors
- Return color from string with/without hash sign
- AcceptTextLimit - turn red in case of unaccepted text limit
- ShowAppVersion - show app version on the UI
-
BringToFront - bring the UI to front
OnEnable
-
DeactivateOnAwake - deactivate gameObject on
Awake
-
DontDestroyOnLoad - sets the gameObject as
DontDestroyOnLoad
inStart
-
FPSDisplay - shows FPS (frame per second) on UI using
OnGUI
- On3DObjectSelection - handy script to get the gameObject when selected/clicked
- SelfDestroy - gameObject destroy itself after passed time, handy for the particles
- CustomParticleSystem - custom particle system to edit features programmatically at run time
Usage TOP
- Just download the project or released plugin version
- put/import it into your project
- And start using the basic listed features
-
OR RECOMMENDED: You can import from Package Manager by selecting the git option with URL using
master-upm
branch https://github.com/mohsinkhan26/UnityBasicProject.git#master-upm - OR You can use this project as the starting point of your project
TODO TOP
- A lot to come, stay tuned
Special Thanks TOP
- All the users who point mistakes and reported issues
- All the users who provide feedback and suggestions to improve