Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by mrommel0 · Jun 16, 2020 at 01:46 PM · screenvirtualscreen sizedesktop

Resizable Virtual Screen in Unity

All the virtual screen technologies I've seen in Unity so far have limited the screen to the size and resolution of the desktop that the remote computer is duplicating. I am looking to create a resizable virtual screen that convinces the remote operating system that it is publishing to a desktop of that size. Note that I am referring to resizing vertically and horizontally, not just proportionally. For example, emulating a physical desktop screen that is 12" tall and 100" wide.

Have any such Unity technologies been developed? If not, are there any technology recommendations on which I can make this capability for the community?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by BladeSides · Jun 16, 2020 at 01:58 PM

I believe you are referring to supersampling, which means to render something at a higher resolution and then scaling it down. It can be achieved by using a RenderTexture and multiplying the Screen Width and Height by the factor you want to increase it by. For example, if you want to render 2880*1620 on a 1920*1080 screen, the factor would be 1.5.

An example script would be:

 using UnityEngine;
 using System.Collections;
 using UnityStandardAssets.ImageEffects;
  
 public class supersampling : MonoBehaviour {
  [ExecuteInEditMode]
  
  RenderTexture RT;
  public Camera cam;
  const int factor = 2;
  
  void Start () {
  RT = new RenderTexture (Screen.width*factor,Screen.height*factor,24, RenderTextureFormat.ARGB32);
  }
  
  void OnRenderImage (RenderTexture source, RenderTexture destination) {
  cam.targetTexture = RT;
  cam.Render();
  cam.targetTexture = null;
  
  Graphics.Blit (RT, destination);
  }
 }
   

You may modify it further by adding custom factors for X and Y coordinates. This should be enough to get you going.

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image mrommel0 · Jun 16, 2020 at 02:50 PM 0
Share

Thanks mate. I'm not just talking about proportional sizing-- that could definitely be achieved with scaling as you mentioned. I'm talking about having an odd screen size-- say 12" tall and 100" wide-- and the OS will be able to drag windows across the entire screen (not just stretch the existing display horizontally)

avatar image thelghome mrommel0 · Jun 16, 2020 at 04:19 PM 0
Share

You have the ratio of virtual screen and the ratio of display. I used to solve it by math.

your question is a bit confusing, as it can be sth like full screen(cropped), or fit screen in correct ratio(with dark/empty area). Thus, you should better provide some reference in picture or drawing. It may help other to understand your need easily.

avatar image mrommel0 thelghome · Jun 16, 2020 at 04:30 PM 0
Share

I'm saying I want the ratio of the virtual screen from its host computer to adapt to the ratio of the Unity object that displays the screen contents. I'm not looking to stretch the inco$$anonymous$$g video stream, but to actually emulate an elongated physical screen, even if it isn't the same screen ratio as the host computer's screen.

I want to actually "convince" the host computer that it is publishing to an extra-wide physical screen, let's say.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

132 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UNFIT SCREEN SIZE FOR MOBILE 0 Answers

How to I make it so that my Game's Window can be resized in window mode? 1 Answer

Scaling game to fit screen size 2 Answers

World Space UI Scale To Fit Screen At DIfferent Aspect Ratios 1 Answer

Getting Device Screen Height and width in inches 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges