• This project
    • Loading...
  • Sign in

TelusPlayground / NestApp

Go to a project
Toggle navigation
Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • NestApp
  • Assets
  • _Nest
  • Scripts
  • NetworkUser.cs
  • Dave Boyle's avatar
    Basic client / server communication working. Successfully sending messages over … · e9fbf3f1 ...
    e9fbf3f1 Browse Files
    …the network to load a video.
    Dave Boyle authored 2016-06-03 16:07:16 -0400
NetworkUser.cs 391 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
using UnityEngine;
using System.Collections;
using UnityEngine.Networking;

public class NetworkUser : NetworkBehaviour
{
    void Start () {
	
	}
	
	void Update ()
    {
        if (Input.GetKeyDown(KeyCode.Q))
            CmdLoadVideo("sample-1920x1024-divx.avi");
	}

    [Command]
    private void CmdLoadVideo(string file)
    {
        MovieLoader.Instance.LoadMovie(file);
    }
}