Я пытаюсь изменить размер элемента игрока для игры Unity3D на моем сайте. Проблема в том, что на самом документе HTML это то, что у меня есть.Изменение размера игрока Unity3D?
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
<!--
var unityObjectUrl = "http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js";
if (document.location.protocol == 'https:')
unityObjectUrl = unityObjectUrl.replace("http://", "https://ssl-");
document.write('<script type="text\/javascript" src="' + unityObjectUrl + '"><\/script>');
-->
</script>
<script type="text/javascript">
var u = new UnityObject2();
u.observeProgress(function (progress) {
var $missingScreen = jQuery(progress.targetEl).find(".missing");
switch(progress.pluginStatus) {
case "unsupported":
showUnsupported();
break;
case "broken":
alert("You will need to restart your browser after installation.");
break;
case "missing":
$missingScreen.find("a").click(function (e) {
e.stopPropagation();
e.preventDefault();
u.installPlugin();
return false;
});
$missingScreen.show();
break;
case "installed":
$missingScreen.remove();
break;
case "first":
break;
}
});
jQuery(function(){
u.initPlugin(jQuery("#unityPlayer")[0], "Tug the Table.unity3d");
});
</script>
<title>Tug the Table - TGH</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="style.css">
<!-- This Template is a WiP - Please report any bugs to the administrative team at The Gaming Hideout. Thank you. All rights reserved. -->
</head>
<body>
<div id="wrap">
<div id="header">
<h1><img src="VexIMG/header.png" alt="The Gaming Hideout" width="760" height="60"></h1>
</div>
<div id="navigation">
<div class="navlinks">
<div id="output2">
</div>
</div>
<script src="nav.js"></script>
</div>
<div id="body">
<div class="game">
<h2>Tug the Table</h2>
<div id="unityPlayer">
<div class="missing">
<a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now!">
<img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" />
</a>
</div>
</div>
<caption>Tug the Table. Theres really nothing else to it.</caption>
</div>
<div id="footer">
<div id="copyright">
Copyright ? The Gaming Hideout<br>
We own no rights on any game on this site unless otherwise noted.<br>
All Rights Reserved.
</div>
<div id="footnav">
<script src="footnav.js"></script>
</div>
</div>
</div>
Это неправильно размера на странице, поэтому я стараюсь, чтобы просмотреть код таким образом, чтобы изменить ширину и высоту, и я ничего не получаю. Поэтому я пытаюсь изменить код элемента из браузера, а затем я вижу это из кода в браузере элементов, который не отображается в HTML.
<div id="unityPlayer">
<embed src="Tug the Table.unity3d" type="application/vnd.unity" width="100%" height="100%" firstframecallback="UnityObject2.instances[0].firstFrameCallback();" style="display: block; width: 100%; height: 100%;">
</div>
Мне нужно, чтобы иметь возможность редактировать мою страницу HTML, поэтому он может редактировать width: 100%
и height: 100%
к моему собственному желаемому размеру. Любая идея о том, как это сделать?
Нет, позвольте мне попробовать это сейчас. –
Отлично работает, спасибо! –
Да, я понял, что после того, как я разместил комментарий, я удалил его. –