Warning: Use of undefined constant printable - assumed 'printable' (this will throw an Error in a future version of PHP) in /Users/fredness/howto/public_html/headfoot.php on line 65

Warning: Use of undefined constant printable - assumed 'printable' (this will throw an Error in a future version of PHP) in /Users/fredness/howto/public_html/headfoot.php on line 109
HOWTOlabs  
 Services     Software     Commentary     Design     Astral Musings   
Unity
rich computer game engine and development environment
Elsewhere [edit]

Unity
rickatech, 2019-06

Unity is a computer game engine and development environment.  It was initially built for use on and with Microsoft Windows, and heavily relies on Microsoft's .Net scripting framework.  As of at least 2019, Unity has been ported to Linux and MacOS environment, and .Net supporting libraries are included.

Code excerpt for the classic UFO tutorial.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class PlayerControl : MonoBehaviour {

    //  Holy crap, the YouTube video has a typo in it
    //  https://answers.unity.com/questions/1093995/assetsscriptsplayercontrollercs1027-error-cs0246-t.html
    //  Also, Unity may need a Project Setting tweaked
    //  Configuration / Scripting RUntime Setting NET 3.5 -> 4.0
    //  https://forum.unity.com/threads/text-mesh-pro-dozens-of-errors-with-unity-2019-1.662575/#post-4436926

    private Rigidbody2D rb2d;  //  Note the spelling/case

    void Start ()
    {
        rb2d = GetComponent ();
    }

    void FixedUpdate()
    {
        float moveHorizontal = Input.GetAxis("Horizontal");
        float moveVertical = Input.GetAxis("Vertical");
        Vector2 movement = new Vector2(moveHorizontal, moveVertical);
        rb2d.AddForce (movement);
    }

    // Start is called before the first frame update
    //  void Start() {}

    // Update is called once per frame
    //  void Update() { }
}  
<html>
<head>
<title>DIV XMLHTTP example</title>
</head>

<body>

<button id="mybutton">Make a request</button>

<button id="myreset">Reset</button>

<div id="mydiv" style="border: solid; margin: 1em;">Show
  this text when this page is first loaded</div>

<script type="text/javascript">

    var http_request = false;

    function makeRequest(url) {
        if (window.XMLHttpRequest) { // Mozilla, Safari, IE7...
            http_request = new XMLHttpRequest();
            }
        else if (window.ActiveXObject) { // IE6 and older
            http_request = new ActiveXObject("Microsoft.XMLHTTP");
            }
        http_request.onreadystatechange = alertContents;
        http_request.open('GET', url, true);
        http_request.send(null);
        }

    function alertContents() {
        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
                document.getElementById('mydiv').innerHTML = http_request.responseText;
                }
            else {
                alert('There was a problem with the request.');
                }
            }
        }

    document.getElementById('mybutton').onclick = function() {
        makeRequest('get-rich-content.html');
        }

    document.getElementById('myreset').onclick = function() {
        document.getElementById('mydiv').innerHTML = 'Show this text on reset';
        }

</script>
</body>
</html>

Git Concerns - TBD

Creating a local git repository
Adding ignore files
Adjusting Unity settings
Pushing to remote repository.
Fetching, pulling, merging.
Adding, committing.
Miscellaneous

Links under review


Warning: Use of undefined constant printable - assumed 'printable' (this will throw an Error in a future version of PHP) in /Users/fredness/howto/public_html/headfoot.php on line 216
zap technologies
tablet | Warning: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' (this will throw an Error in a future version of PHP) in /Users/fredness/howto/public_html/headfoot.php on line 223
CLASS=WHITE HREF=/unity/index.php?printable=printable>printable