Hi! This project is requested by Struckd to demonstrate my skills in unity, though I tried different coding skills here but I did not create different namespace and/or different AssemblyDefs because this project is relatively small in size. The icons is being used from UXWing which is free to use without attribution.
I tried to recreate the Struckd's Application and by the same way user can
- Move their camera by using one finger.
- Rotate and zoom by using two finger .
- Move the object on X-Z by dragging the UIEditor of the object
- The up-down button to change the Y axis of the selected object
- The top right corner image is used to scale up and down the item
- The delete button on the bottom of the editor UI to delete the selected object.
- On the top left corner the Undo button to undo the changes in current session
- And on the bottom left corner the AllAssetsRemove button is there to remove all the assets
The main 5 Managers classes here are
- GameManager.cs
- InputManager.cs
- UIManager.cs
- SessionHandler.cs
- TouchController.cs
The GameManager is maintaining the GameState and has reference of the instances of UIManager, SessionHandler and TouchController The InputHanler is detecting the touch input and firing events The UIManager is the main communication from UI to other classes The SessionHandler is the maintainer of current session and saving the session to a file The TouchController is mainly responsible for move around the world
There were many challenges faced while developing this application most 2 of them are
- Change of the size of Selected Object UI: Here the bounds of the mesh are detecting and from the bound position, it is converted to screen space using UIRectAreaOf3DObjects and then the screen space is converting to Canvas Space with custom written class CanvasExtention.
- The X-Z Plane movement of Object changes with the rotation of the camera, I implement an initial solution in a wrong way, which is to change the delta with the rotation value of camera. Then I used the Transform.Forward and Transform.Right vectors of the camera and get the Normalized direction from them and then change the X-Z Plane of the movement.
- The Filehandler.cs is using binary format to store the values into local file system
- The Scriptable Objects SessionDataSO storing the current session data, CurrentSelectedItem storing the value of the current Item that is selected and 3DItemList is storing the 3D Items that needs to place in scene.
- The ItemEditorUIScript, ItemScaleUIScript, ItemYAxisMove and ItemDeleteButtonScript is used to manipulate the selected item in the world and ItemSelectUIScript is used to manipulate the UI that is controlling the Object.
- The ItemController is used to do the transform changes on the item by AllItemInSceneController class.
- TMPro for crystal clear text
- InputSystem for Unity's Enhanced Touch Input
- Sprite Editor to edit PNGs