Commit faa6ef78 authored by Poienar Robert's avatar Poienar Robert

Attempt with Prefab popup

parent 3683fa07
......@@ -42,7 +42,6 @@ public class AltSocketServer {
protected readonly int portNumber;
protected readonly System.Net.IPEndPoint localEndPoint;
protected readonly int maxClients;
public int PortNumber {
get {
return portNumber;
......
......@@ -3,6 +3,8 @@
public class AltUnityRunner : UnityEngine.MonoBehaviour, AltIClientSocketHandlerDelegate
{
public UnityEngine.GameObject AltUnityPopUp;
public UnityEngine.UI.Image AltUnityIcon;
private static AltUnityRunner _altUnityRunner;
private UnityEngine.Vector3 _position;
......@@ -39,6 +41,8 @@ public class AltUnityRunner : UnityEngine.MonoBehaviour, AltIClientSocketHandler
public string requestSeparatorString=";";
public string requestEndingString="&";
private static AltResponseQueue _responseQueue;
void Awake()
......@@ -1410,9 +1414,31 @@ public class AltUnityRunner : UnityEngine.MonoBehaviour, AltIClientSocketHandler
handler.SendResponse(errorCouldNotPerformOperationMessage);
});
}
public void IconPressed()
{
_socketServer.Cleanup();
_socketServer.StartListeningForConnections();
AltUnityPopUp.SetActive(true);
}
void Update()
{
if (_socketServer.ClientCount!=0)
{
AltUnityPopUp.SetActive(false);
}
else
{
AltUnityPopUp.SetActive(true);
}
if (_socketServer.IsStarted())
{
AltUnityIcon.color = UnityEngine.Color.white;
}
else
{
AltUnityIcon.color = UnityEngine.Color.red;
}
_responseQueue.Cycle();
}
......
fileFormatVersion: 2
guid: 0f1a80f61f5b88b4e936cd2851440318
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment