예제 #1
0
	void Awake()
	{
		_instance = this;
#if UNITY_ANDROID && ENABLE_PLUGIN
		android = new AndroidJavaObject(ObjectClassPath);
		android.Call("init", gameObject.name, "ScreenshotReceiveAgentEvent");
#endif
	}
예제 #2
0
    private IEnumerator DoShare()
    {
        ScreenshotAgent.Enable();

        yield return(null);

//		IOSSocialManager.instance.ShareMedia( shareCopy, ScreenshotAgent.GetTexture() );
    }
예제 #3
0
    void Awake()
    {
        _instance = this;
#if UNITY_ANDROID && ENABLE_PLUGIN
        android = new AndroidJavaObject(ObjectClassPath);
        android.Call("init", gameObject.name, "ScreenshotReceiveAgentEvent");
#endif
    }
예제 #4
0
    void Awake()
    {
        if (mInstance != null)
        {
            Debug.LogError(string.Format("Only one instance of ScreenshotAgent allowed! Destroying:" + gameObject.name + ", Other:" + mInstance.gameObject.name));
            return;
        }

        mInstance = this;

        texture = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);
        Disable();
    }
예제 #5
0
    void Awake()
    {
        if( mInstance != null )
        {
            Debug.LogError( string.Format( "Only one instance of ScreenshotAgent allowed! Destroying:" + gameObject.name +", Other:" + mInstance.gameObject.name ) );
            return;
        }

        mInstance = this;

        adjustedWidth = Mathf.RoundToInt( Screen.height / 3f * 4f );
        adjustedX = Mathf.RoundToInt( ( Screen.width - adjustedWidth ) / 2f );

        texture = new Texture2D( adjustedWidth, Screen.height, TextureFormat.RGB24, false );
        Disable();
    }