133 Commits

Author SHA1 Message Date
henrisel b424c6467b Unity pipeline scripts cleanup + enable dev build 2025-12-17 15:46:57 +02:00
henrisel 409b9fbb51 small cleanup of pipeline script 2025-12-17 15:46:01 +02:00
henrisel 2c19602e9b refactor image generation script + env vars 2025-12-17 13:23:59 +02:00
henrisel 90781191b7 manage spawned object node hierarchy better 2025-12-16 13:30:08 +02:00
henrisel 5796887f79 properly replace archery target object's child with generated object 2025-12-16 11:56:56 +02:00
henrisel 0cb92b2442 use voice transcription box and model gen box in archery range 2025-12-16 11:22:09 +02:00
henrisel 32a5e4f332 test boxes change colours based on progress 2025-12-16 10:43:58 +02:00
henrisel 5956b9508d test boxes collide with player in VR mode, too 2025-12-15 16:57:30 +02:00
henrisel 7be20d249e model generation test box takes input prompt from voice transcription box 2025-12-15 15:57:32 +02:00
henrisel 9c7536d1d4 transcribe voice to text with Whisper base model 2025-12-15 15:30:15 +02:00
henrisel 0c026078d0 install whisper.unity package 2025-12-15 13:57:07 +02:00
henrisel 843bd141eb test different art styles, change pipeline prompt 2025-12-05 16:58:07 +02:00
henrisel 408949e5c2 WIP: spawn generated model as archery range target 2025-12-01 17:19:31 +02:00
henrisel 40e273f51e refactored model generation code out of test box into separate pipeline manager 2025-12-01 17:06:42 +02:00
henrisel a66cb8f62c fix prompt 2025-11-28 15:29:00 +02:00
henrisel cc3c481295 try out different text-to-img and img-to-3d params 2025-11-28 15:27:37 +02:00
henrisel 2980631414 decrease texture baking optimisation total steps 2025-11-21 16:30:56 +02:00
henrisel c15ae24c7a tune 3d generation params 2025-11-21 14:39:16 +02:00
henrisel 7f02dccc6b use SD-XL model for img gen in pipeline 2025-11-21 12:57:53 +02:00
henrisel 34a6c50598 clean up code + prompt engineering for image generation 2025-11-21 11:39:36 +02:00
henrisel 191c9e66fe fix metallic property when spawning object 2025-11-21 10:32:15 +02:00
henrisel d7fec73c77 added logging to file 2025-11-14 09:53:30 +02:00
henrisel 590c62eadd incorporate InvokeAI into start_pipeline.py 2025-11-12 17:51:02 +02:00
henrisel fdd4ff827e reimplement function from invokeai_mcp_server to make requests to local InvokeAI 2025-11-10 18:19:16 +02:00
henrisel d2e1c7b56f fix networking UI again + tweaks to pipeline script 2025-11-07 16:56:34 +02:00
henrisel 09f764c0df integrate local trellis api into start_pipeline.py 2025-11-07 16:22:13 +02:00
henrisel 447449e1b3 local TRELLIS API test notebook 2025-11-07 14:54:41 +02:00
henrisel d43408cf01 move pipeline starter in map 2025-11-05 18:02:06 +02:00
henrisel 9bfc55f2d6 add glTFast package + load in model after pipeline generation 2025-11-05 17:54:48 +02:00
Henri Sellis 1b0d9fd0b0 pipeline script passes generated model filepath to Unity 2025-11-02 17:20:41 +02:00
Henri Sellis f8ca8570af fix network manager (again) 2025-11-02 16:06:36 +02:00
henrisel e25f1c75b5 update env example 2025-10-24 13:34:24 +03:00
henrisel c5c40f58ab Cube that starts generation pipeline on collision 2025-10-24 12:00:27 +03:00
Henri Sellis 2971027af2 fix start game UI 2025-10-24 10:22:53 +03:00
Henri Sellis 34a23ab94d make 3d model generation model folder loc configurable 2025-10-24 10:03:16 +03:00
Henri Sellis 8b3965d0b1 generated images and models into gitignore 2025-10-24 09:49:24 +03:00
henrisel 42d7c0059b Add TODO Azure OpenAI API 2025-10-21 14:32:19 +00:00
Henri Sellis 6413d5a3d6 start pipeline script dynamically calculates absolute paths 2025-10-20 16:37:02 +03:00
Henri Sellis e4f9423ca6 passing user prompt to pipeline script as cmd argument 2025-10-19 12:17:34 +03:00
Henri Sellis 1bb878848f combined pipeline running function 2025-10-18 16:44:38 +03:00
Henri Sellis ae497eac6e test local text-to-image models and cloudflare API 2025-10-18 16:06:54 +03:00
Henri Sellis 2cf0a9f711 start of 3d generation pipelines 2025-10-11 18:37:46 +03:00
rannosam 6b8c3b6fbb Merge pull request 'SamWorkset' (#5) from SamWorkset into master
Reviewed-on: https://127.0.0.1:3000/cgvr/DeltaVR/pulls/5
2025-10-11 13:47:30 +00:00
rannosam cb73b9cbbc messing with LFS 2025-10-11 16:44:58 +03:00
rannosam 07cdba6097 messing with LFS 2025-10-11 16:43:42 +03:00
rannosam b9448fb4c7 Upload files to "Doc/clips" 2025-10-07 10:30:34 +00:00
rannosam 4b1d8ea5bd Delete Doc/clips/Player-Collide-Offset-Clip.gif 2025-10-07 10:21:00 +00:00
rannosam 6a76fa038f Upload files to "Doc/clips" 2025-10-07 10:16:24 +00:00
rannosam 8af4eff8c7 Upload files to "Doc/clips" 2025-10-03 13:53:59 +00:00
rannosam b38461fc52 Delete Doc/clips/Multiplayer-join-Clip.mp4 2025-10-03 13:53:37 +00:00
rannosam e5baba75cf Delete Doc/clips/Singleplayer-Join-Clip.mp4 2025-10-03 13:53:28 +00:00
rannosam b9515d50d0 Delete Doc/clips/Quit-Clip.mp4 2025-10-03 13:53:20 +00:00
rannosam e06b0206c8 Upload files to "Doc/clips" 2025-10-03 13:36:43 +00:00
rannosam cd0313e693 Forgot to build 2025-10-03 16:33:20 +03:00
rannosam 1580f40636 Added multiplayer joining capability to the desktop UI 2025-09-30 18:22:46 +03:00
rannosam 803e87688a Forgot to zip the build 2025-09-26 12:23:40 +03:00
rannosam 6479d850e9 Worked on restart button. Unsuccessful, left it disabled. 2025-09-26 12:21:08 +03:00
rannosam bad94ab628 Updated the UI. Refresh button is disabled for now and multiplayer needs testing. Added quit button. 2025-09-25 18:53:36 +03:00
rannosam a8568685ab made skywalk teleportation istructions flip according to the rotation of the entered player. 2025-09-23 15:16:55 +03:00
rannosam eadbd139e4 Fixed invisible car and tutorial text. Did some minor cosmetic improvements. 2025-09-21 18:54:35 +03:00
rannosam 4f0e84caae Fixed lone elevator reflections (forgot to re-assign materials) 2025-09-20 20:26:40 +03:00
rannosam 25ed189168 Reconfigured elevator reflections, added additional teleportable areas, resized box colliders and meddled with corrupted elements. 2025-09-20 20:16:48 +03:00
rannosam f5ba95849e Delete Doc/clips/Old menu gif.gif 2025-09-19 12:06:07 +00:00
rannosam c5b90be63f Upload files to "Doc/clips" 2025-09-19 12:05:54 +00:00
rannosam 5a41559b88 Upload files to "Doc/clips"
Added the old menu gif
2025-09-19 11:57:21 +00:00
rannosam 5ab753f4b5 Merge pull request 'Doing minor changes' (#4) from SamWorkset into master
Reviewed-on: https://127.0.0.1:3000/cgvr/DeltaVR/pulls/4
2025-09-19 11:51:52 +00:00
rannosam ed18f85228 Doing minor changes 2025-09-19 14:48:02 +03:00
rannosam dab664b62a Update README.md 2025-09-15 17:57:21 +00:00
rannosam 9d389a3296 Merge pull request 'SamWorkset' (#3) from SamWorkset into master
Reviewed-on: https://127.0.0.1:3000/cgvr/DeltaVR/pulls/3
2025-09-15 17:55:36 +00:00
rannosam c7ed19b8dc Added complete lift interaction. Might need some debugging later. 2025-09-15 20:49:01 +03:00
rannosam 5e251e9d23 Added the elevator. Needs configuring, doing a quicksave before editing project settings. 2025-09-10 19:13:32 +03:00
rannosam b176dcc20a added ground trascans 2025-09-03 22:13:59 +03:00
rannosam a1c495cf92 added card readers to doors 2025-08-29 16:29:09 +03:00
rannosam 9f65f3d476 fixed build freezing issue, added decorations to door card readers 2025-08-29 15:53:25 +03:00
rannosam 317d74dfef testing git 2025-08-28 19:02:04 +03:00
rannosam 7ec96e6fdd Added decorations to the building and re-instaled Unity (new computer) 2025-08-28 18:39:09 +03:00
rannosam f42fc6463c added in-game UI option improvements 2025-06-21 13:45:26 +03:00
rannosam d269226b4b Update README.md 2025-06-18 08:45:31 +00:00
rannosam 47d505a1ba Update README.md 2025-06-17 16:26:30 +00:00
rannosam e7ad8e6fd4 Update Readme 2025-06-17 16:23:35 +00:00
rannosam 36e3b95645 Replaced clips for readme 2025-06-17 15:29:34 +00:00
rannosam b012ae17b2 Added clips for readme 2025-06-11 17:26:54 +00:00
rannosam 11b4c264ef fixed arrchery range score bug 2025-05-28 20:44:46 +03:00
rannosam a3f514b6eb filled the credits tab, added lobby picture(when setting up, see background), updated UFO sounds 2025-05-28 19:43:19 +03:00
rannosam b9ccfb1c3a Update README.md 2025-05-28 10:48:13 +00:00
rannosam cdd6a2e96d Update README.md 2025-05-27 15:29:09 +00:00
rannosam 9af005b651 Merge pull request 'Added options and credits tabs for the in-game UI menu. Credits tab is blank for now. Disabled smooth locomotion to address the player controller confusion issues (see my thesis). Smooth locomotion can be reactivated via the options menu.' (#2) from SamWorkset into master
Reviewed-on: https://127.0.0.1:3000/cgvr/DeltaVR/pulls/2
2025-05-27 11:20:01 +00:00
rannosam e9b013a904 Update README.md 2025-05-27 11:11:04 +00:00
rannosam 262a67293e Update README.md 2025-05-27 11:10:37 +00:00
rannosam bc7217fce3 Added options and credits tabs for the in-game UI menu. Credits tab is blank for now. Disabled smooth locomotion to address the player controller confusion issues (see my thesis). Smooth locomotion can be reactivated via the options menu. 2025-05-25 20:07:14 +03:00
rannosam ab2406c367 Update README.md 2025-05-22 15:49:08 +00:00
rannosam 0f409ddb08 Merge pull request 'SamWorkset' (#1) from SamWorkset into master
Reviewed-on: https://127.0.0.1:3000/cgvr/DeltaVR/pulls/1
2025-05-22 15:43:50 +00:00
rannosam d3f41bd245 Fixed an issue wit the server room alarm being restarted when button pushed during alarm 2025-05-22 18:38:48 +03:00
cgvr 4aa139be24 Update README.md 2025-05-22 15:35:10 +00:00
cgvr b4c665abe4 Update README.md 2025-05-22 15:32:07 +00:00
jee7 b84e1b7837 Merge branch 'master' of https://cgvrgit.ulno.net/cgvr/DeltaVR 2025-05-20 22:53:54 +03:00
jee7 e9fe4cb559 Added design files 2025-05-20 22:53:35 +03:00
cgvr d2673f52e1 Update README.md 2025-05-20 19:40:24 +00:00
cgvr e6045f7775 Update README.md 2025-05-20 19:38:43 +00:00
cgvr e6ddcc7390 Update README.md 2025-05-20 19:37:40 +00:00
cgvr 75cfdd7a48 Update README.md 2025-05-20 19:34:22 +00:00
jee7 071c1db4f4 Whiteboard clip fix 2025-05-20 22:14:13 +03:00
jee7 9bd8601edb Added Doc folder. Graphical elements for the Readme.md. 2025-05-20 21:58:13 +03:00
rannosam ffd98b6322 added scoring system for the bow game 2025-05-20 14:53:35 +03:00
rannosam 03a3ca570e Added slideshow (disabled, but fully functional, not actually part of the player experience, just for fun). Moved teleport button for bolt car onto its front. Added signs for barred areas and server entry guiding. 2025-05-09 19:18:31 +03:00
rannosam fe60892585 trying to get LFS to work 2025-03-25 20:58:23 +02:00
rannosam fe90ea9996 trying to get LFS to work 2025-03-25 20:55:18 +02:00
rannosam 7f643bf361 Ensure LFS tracking and add large file 2025-03-25 20:40:35 +02:00
rannosam 1287fd8f39 Removed large files from Git history. LFS needs it to be so in order to be configured 2025-03-25 20:35:49 +02:00
rannosam ac04a4ee16 fixing an LFS issue 2025-03-25 20:26:33 +02:00
rannosam e40106b45e added UFO skywalk animation and bolt car teleport button 2025-03-25 20:09:15 +02:00
rannosam 7ea187f9fd fixing push issue 2025-03-09 21:48:52 +02:00
rannosam b62e851c0e finished portal fundimentals 2025-03-09 20:43:38 +02:00
rannosam 960991b17d added portals 2025-01-24 03:14:07 +02:00
rannosam 9f4da45c40 fixed network manager prefab issue 2025-01-22 21:33:47 +02:00
rannosam afab7d7810 Merge commit 'e7f8693f' into SamWorkset 2025-01-22 21:22:58 +02:00
rannosam 3db109d127 commiting minor changes 2025-01-22 21:22:00 +02:00
rannosam 42aacaafb4 prepping for new skywalk system 2025-01-22 19:43:13 +02:00
Ranno Samuel Adson 776c68736d constructed entryway for skywalk 2025-01-15 21:44:46 +02:00
Ranno Samuel Adson 7ba5fe1f30 Implimented the card 2025-01-07 02:40:37 +02:00
Ranno Samuel Adson 98094a9f5f Adding server room sound effects and button to trigger them 2025-01-02 16:37:16 +02:00
Ranno Samuel Adson de968605ec installed server racks 2024-12-28 20:11:26 +02:00
Ranno Samuel Adson 8177855e63 finished bolt car interaction 2024-12-28 18:15:03 +02:00
Ranno Samuel Adson 8cba77447f worked on ground moddelling. Doing a quicksave before doing a large model alteration. 2024-12-27 16:23:25 +02:00
Ranno Samuel Adson fa3d2f7ec8 worked on ground moddelling. Doing a quicksave before altering materials. 2024-12-27 15:24:51 +02:00
Ranno Samuel Adson 5df9dacfb5 making changes to lighting. This is a backup just in case 2024-12-27 14:11:36 +02:00
Toomas Tamm 50bf9bc51b Update readme.md 2023-06-11 13:03:27 +03:00
Toomas Tamm 07b9b9e2f4 deltavr multiplayer 2.0 2023-05-08 15:56:10 +03:00
Joonasp1 978809a002 Update README.md 2022-07-08 21:23:59 +00:00
Joonasp1 5eb057a77f readme update 2022-07-08 21:21:55 +00:00
Joonasp1 751e34975e readme multiplayer additions 2022-07-07 16:25:37 +00:00
joonasp 04baadfad1 non-vr lobby, version fix 2022-06-29 14:45:17 +03:00
Toomas Tamm 5774be9822 Set Breakout Forcefield speed to 0 2021-06-09 10:49:50 +03:00
9596 changed files with 701983 additions and 920894 deletions
+23 -2
View File
@@ -1,8 +1,8 @@
* text=auto
# Unity files
*.meta -text merge=unityyamlmerge diff
*.unity -text merge=unityyamlmerge diff
*.asset -text merge=unityyamlmerge diff
*.unity filter=lfs diff=lfs merge=lfs -text
*.asset filter=lfs diff=lfs merge=lfs -text
*.prefab -text merge=unityyamlmerge diff
*.mat -text merge=unityyamlmerge diff
*.anim -text merge=unityyamlmerge diff
@@ -79,3 +79,24 @@
*.tar filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text
*.hdr filter=lfs diff=lfs merge=lfs -text
*.cubemap filter=lfs diff=lfs merge=lfs -text
*.assets filter=lfs diff=lfs merge=lfs -text
*.resS filter=lfs diff=lfs merge=lfs -text
*.dylib filter=lfs diff=lfs merge=lfs -text
*.tar.7z filter=lfs diff=lfs merge=lfs -text
*.f8 filter=lfs diff=lfs merge=lfs -text
Assets/_PROJECT/Components/Portals2/New[[:space:]]Cubemap.cubemap filter=lfs diff=lfs merge=lfs -text
Assets/_PROJECT/Other/Delta[[:space:]](Toomas)[[:space:]]v3.blend filter=lfs diff=lfs merge=lfs -text
Assets/_PROJECT/Other/Delta[[:space:]](Toomas)[[:space:]]v3.blend1 filter=lfs diff=lfs merge=lfs -text
Assets/_PROJECT/Scenes/DeltaBuilding_base/LightingData.asset filter=lfs diff=lfs merge=lfs -text
Build/DeltaVR_Data/level0 filter=lfs diff=lfs merge=lfs -text
Build/DeltaVR_Data/sharedassets0.assets filter=lfs diff=lfs merge=lfs -text
Build/DeltaVR_Data/sharedassets0.assets.resS filter=lfs diff=lfs merge=lfs -text
Library/Artifacts/6e/6e8680668429d5a691eb5372cd18a3f8 filter=lfs diff=lfs merge=lfs -text
Library/PackageCache/com.unity.burst@1.8.3/.Runtime/libburst-llvm-14.dylib filter=lfs diff=lfs merge=lfs -text
Library/PackageCache/com.unity.toolchain.win-x86_64-linux-x86_64@2.0.4/data~/payload.tar.7z filter=lfs diff=lfs merge=lfs -text
Library/PlayerDataCache/Win64/Data/level0 filter=lfs diff=lfs merge=lfs -text
Library/PlayerDataCache/Win64/Data/sharedassets0.assets filter=lfs diff=lfs merge=lfs -text
Library/PlayerDataCache/Win64/Data/sharedassets0.assets.resS filter=lfs diff=lfs merge=lfs -text
Assets/_PROJECT/Scenes/DeltaBuilding_base.unity filter=lfs diff=lfs merge=lfs -text
*.ext filter=lfs diff=lfs merge=lfs -text
+4
View File
@@ -73,3 +73,7 @@ crashlytics-build.properties
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
Recordings/
# Paid assets
/[Aa]ssets/Magic Light Probes/*
/[Aa]ssets/[Bb]akery/*
+6
View File
@@ -0,0 +1,6 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedGame"
]
}
+5
View File
@@ -0,0 +1,5 @@
INVOKEAI_URL=
TRELLIS_URL=
CLOUDFLARE_ACCOUNT_ID=
CLOUDFLARE_API_TOKEN=
+7
View File
@@ -0,0 +1,7 @@
.venv
.env
__pycache__
images/
models/
logs/
notebooks/test_resources/
+6
View File
@@ -0,0 +1,6 @@
### TODO
* Artikkel text-to-3d prompt engineeringu kohta: "Sel3DCraft: Interactive Visual Prompts for User-Friendly Text-to-3D Generation"
* TRELLIS: postprocessing_utils: texture baking mode: 'opt' vs 'fast' - hardcoded 'opt', kui võimaldada 'fast' siis tuleb error
### Notes
* TRELLIS: added functionality to specify texture baking optimisation total steps as an argument (`texture_opt_total_steps`), to replace the hardcoded 2500. But this is not tracked in Git (because modified this https://github.com/IgorAherne/trellis-stable-projectorz/releases/tag/latest)
+61
View File
@@ -0,0 +1,61 @@
import base64
import requests
import os
from dotenv import load_dotenv
load_dotenv()
ACCOUNT_ID = os.environ["CLOUDFLARE_ACCOUNT_ID"]
API_TOKEN = os.environ["CLOUDFLARE_API_TOKEN"]
def text_to_image_cloudflare(prompt, output_path):
MODEL = "@cf/black-forest-labs/flux-1-schnell"
URL = f"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/{MODEL}"
payload = {
"prompt": prompt,
}
headers = {
"Authorization": f"Bearer {API_TOKEN}",
"Content-Type": "application/json",
}
resp = requests.post(URL, json=payload, headers=headers, timeout=60)
resp.raise_for_status()
data = resp.json()
b64 = data["result"]["image"]
if not b64:
raise RuntimeError(f"Unexpected response structure: {data}")
img_bytes = base64.b64decode(b64)
with open(output_path, "wb") as f:
f.write(img_bytes)
return True
def refine_text_prompt(prompt):
MODEL = "@cf/meta/llama-3.2-3b-instruct"
URL = f"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/{MODEL}"
instructions = """
User is talking about some object. Your task is to generate a short and concise description of it. Use only user's own words, keep it as short as possible.
Example:
User: 'Umm, okay, I would like a really cool sword, with for example a bright orange crossguard. And also it should be slightly curved.'
You: 'a slightly curved sword with bright orange crossguard'
"""
response = requests.post(URL,
headers={"Authorization": f"Bearer {API_TOKEN}"},
json={
"messages": [
{"role": "system", "content": instructions},
{"role": "user", "content": prompt}
]
}
)
data = response.json()
return data["result"]["response"]
@@ -0,0 +1,489 @@
# Based on: https://github.com/coinstax/invokeai-mcp-server
import requests
import asyncio
import json
import logging
import httpx
import os
from typing import Optional
from urllib.parse import urljoin
from dotenv import load_dotenv
# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("invokeai-mcp")
load_dotenv()
INVOKEAI_BASE_URL = os.environ["INVOKEAI_URL"]
DEFAULT_QUEUE_ID = "default"
# HTTP client
http_client: Optional[httpx.AsyncClient] = None
def get_client() -> httpx.AsyncClient:
"""Get or create HTTP client."""
global http_client
if http_client is None:
http_client = httpx.AsyncClient(base_url=INVOKEAI_BASE_URL, timeout=120.0)
return http_client
async def text_to_image_invoke_ai(prompt, output_path):
# see available model keys via GET http://127.0.0.1:9090/api/v2/models/?model_type=main
args = {
"prompt": prompt,
"width": 512,
"height": 512,
"model_key": "79401292-0a6b-428d-b7d7-f1e86caeba2b" # Juggernaut XL v9
#"model_key": "735f6485-6703-498f-929e-07cf0bbbd179" # Dreamshaper 8
}
image_url = await generate_image(args)
print("got image url: ", image_url)
download_file(image_url, output_path)
async def wait_for_completion(batch_id: str, queue_id: str = DEFAULT_QUEUE_ID, timeout: int = 300) -> dict:
"""Wait for a batch to complete and return the most recent image."""
client = get_client()
start_time = asyncio.get_event_loop().time()
while True:
# Check if we've exceeded timeout
if asyncio.get_event_loop().time() - start_time > timeout:
raise TimeoutError(f"Image generation timed out after {timeout} seconds")
# Get batch status
response = await client.get(f"/api/v1/queue/{queue_id}/b/{batch_id}/status")
response.raise_for_status()
status_data = response.json()
# Check for failures
failed_count = status_data.get("failed", 0)
if failed_count > 0:
# Try to get error details from the queue
queue_status_response = await client.get(f"/api/v1/queue/{queue_id}/status")
queue_status_response.raise_for_status()
queue_data = queue_status_response.json()
raise RuntimeError(
f"Image generation failed. Batch {batch_id} has {failed_count} failed item(s). "
f"Queue status: {json.dumps(queue_data, indent=2)}"
)
# Check completion
completed = status_data.get("completed", 0)
total = status_data.get("total", 0)
if completed == total and total > 0:
# Get most recent non-intermediate image
images_response = await client.get("/api/v1/images/?is_intermediate=false&limit=10")
images_response.raise_for_status()
images_data = images_response.json()
# Return the most recent image (first in the list)
if images_data.get("items"):
return {
"batch_id": batch_id,
"status": "completed",
"result": {
"outputs": {
"save_image": {
"type": "image_output",
"image": {
"image_name": images_data["items"][0]["image_name"]
}
}
}
}
}
# If no images found, return status
return status_data
# Wait before checking again
await asyncio.sleep(1)
async def generate_image(arguments: dict):
# Extract parameters
prompt = arguments["prompt"]
negative_prompt = arguments.get("negative_prompt", "")
width = arguments.get("width", 512)
height = arguments.get("height", 512)
steps = arguments.get("steps", 30)
cfg_scale = arguments.get("cfg_scale", 7.5)
scheduler = arguments.get("scheduler", "euler")
seed = arguments.get("seed")
model_key = arguments.get("model_key")
lora_key = arguments.get("lora_key")
lora_weight = arguments.get("lora_weight", 1.0)
vae_key = arguments.get("vae_key")
print(f"Generating image with prompt: {prompt[:50]}...")
# Create graph
graph = await create_text2img_graph(
prompt=prompt,
negative_prompt=negative_prompt,
model_key=model_key,
lora_key=lora_key,
lora_weight=lora_weight,
vae_key=vae_key,
width=width,
height=height,
steps=steps,
cfg_scale=cfg_scale,
scheduler=scheduler,
seed=seed
)
# Enqueue and wait for completion
result = await enqueue_graph(graph)
batch_id = result["batch"]["batch_id"]
print(f"Enqueued batch {batch_id}, waiting for completion...")
completed = await wait_for_completion(batch_id)
# Extract image name from result
if "result" in completed and "outputs" in completed["result"]:
outputs = completed["result"]["outputs"]
# Find the image output
for node_id, output in outputs.items():
if output.get("type") == "image_output":
image_name = output["image"]["image_name"]
image_url = await get_image_url(image_name)
return urljoin(INVOKEAI_BASE_URL, image_url)
raise RuntimeError("Failed to generate image!")
def download_file(url, filepath):
response = requests.get(url)
if response.status_code == 200:
with open(filepath, "wb") as file:
file.write(response.content)
else:
raise RuntimeError(f"Failed to download image. Status code: {response.status_code}")
async def get_image_url(image_name: str) -> str:
"""Get the URL for an image."""
client = get_client()
response = await client.get(f"/api/v1/images/i/{image_name}/urls")
response.raise_for_status()
data = response.json()
return data.get("image_url", "")
async def enqueue_graph(graph: dict, queue_id: str = DEFAULT_QUEUE_ID) -> dict:
"""Enqueue a graph for processing."""
client = get_client()
batch = {
"batch": {
"graph": graph,
"runs": 1,
"data": None
}
}
response = await client.post(
f"/api/v1/queue/{queue_id}/enqueue_batch",
json=batch
)
response.raise_for_status()
return response.json()
async def list_models(model_type: str = "main") -> list:
"""List available models."""
client = get_client()
response = await client.get("/api/v2/models/", params={"model_type": model_type})
response.raise_for_status()
data = response.json()
return data.get("models", [])
async def get_model_info(model_key: str) -> Optional[dict]:
"""Get information about a specific model."""
client = get_client()
try:
response = await client.get(f"/api/v2/models/i/{model_key}")
response.raise_for_status()
model_data = response.json()
# Ensure we have a valid dictionary
if not isinstance(model_data, dict):
logger.error(f"Model info for {model_key} is not a dictionary: {type(model_data)}")
return None
return model_data
except Exception as e:
logger.error(f"Error fetching model info for {model_key}: {e}")
return None
async def create_text2img_graph(
prompt: str,
negative_prompt: str = "",
model_key: Optional[str] = None,
lora_key: Optional[str] = None,
lora_weight: float = 1.0,
vae_key: Optional[str] = None,
width: int = 512,
height: int = 512,
steps: int = 30,
cfg_scale: float = 7.5,
scheduler: str = "euler",
seed: Optional[int] = None
) -> dict:
"""Create a text-to-image generation graph with optional LoRA and VAE support."""
# Use default model if not specified
if model_key is None:
# Try to find an sd-1 model
models = await list_models("main")
for model in models:
if model.get("base") == "sd-1":
model_key = model["key"]
break
if model_key is None:
raise ValueError("No suitable model found")
# Get model information
model_info = await get_model_info(model_key)
if not model_info:
raise ValueError(f"Model {model_key} not found")
# Validate model info has required fields
if not isinstance(model_info, dict):
raise ValueError(f"Model {model_key} returned invalid data type: {type(model_info)}")
required_fields = ["key", "hash", "name", "base", "type"]
for field in required_fields:
if field not in model_info or model_info[field] is None:
raise ValueError(f"Model {model_key} is missing required field: {field}")
# Generate random seed if not provided
if seed is None:
import random
seed = random.randint(0, 2**32 - 1)
# Detect if this is an SDXL model
is_sdxl = model_info["base"] == "sdxl"
# Build nodes dictionary
nodes = {
# Main model loader - use sdxl_model_loader for SDXL models
"model_loader": {
"type": "sdxl_model_loader" if is_sdxl else "main_model_loader",
"id": "model_loader",
"model": {
"key": model_info["key"],
"hash": model_info["hash"],
"name": model_info["name"],
"base": model_info["base"],
"type": model_info["type"]
}
},
# Positive prompt encoding - use sdxl_compel_prompt for SDXL
"positive_prompt": {
"type": "sdxl_compel_prompt" if is_sdxl else "compel",
"id": "positive_prompt",
"prompt": prompt,
**({"style": prompt} if is_sdxl else {})
},
# Negative prompt encoding - use sdxl_compel_prompt for SDXL
"negative_prompt": {
"type": "sdxl_compel_prompt" if is_sdxl else "compel",
"id": "negative_prompt",
"prompt": negative_prompt,
**({"style": ""} if is_sdxl else {})
},
# Noise generation
"noise": {
"type": "noise",
"id": "noise",
"seed": seed,
"width": width,
"height": height,
"use_cpu": False
},
# Denoise latents (main generation step)
"denoise": {
"type": "denoise_latents",
"id": "denoise",
"steps": steps,
"cfg_scale": cfg_scale,
"scheduler": scheduler,
"denoising_start": 0,
"denoising_end": 1
},
# Convert latents to image
"latents_to_image": {
"type": "l2i",
"id": "latents_to_image"
},
# Save image
"save_image": {
"type": "save_image",
"id": "save_image",
"is_intermediate": False
}
}
# Add LoRA loader if requested
if lora_key is not None:
lora_info = await get_model_info(lora_key)
if not lora_info:
raise ValueError(f"LoRA model {lora_key} not found")
# Validate LoRA info has required fields
required_fields = ["key", "hash", "name", "base", "type"]
for field in required_fields:
if field not in lora_info or lora_info[field] is None:
raise ValueError(f"LoRA model {lora_key} is missing required field: {field}")
nodes["lora_loader"] = {
"type": "lora_loader",
"id": "lora_loader",
"lora": {
"key": lora_info["key"],
"hash": lora_info["hash"],
"name": lora_info["name"],
"base": lora_info["base"],
"type": lora_info["type"]
},
"weight": lora_weight
}
# Add VAE loader if requested (to override model's built-in VAE)
if vae_key is not None:
vae_info = await get_model_info(vae_key)
if not vae_info:
raise ValueError(f"VAE model {vae_key} not found")
# Validate VAE info has required fields
required_fields = ["key", "hash", "name", "base", "type"]
for field in required_fields:
if field not in vae_info or vae_info[field] is None:
raise ValueError(f"VAE model {vae_key} is missing required field: {field}")
nodes["vae_loader"] = {
"type": "vae_loader",
"id": "vae_loader",
"vae_model": {
"key": vae_info["key"],
"hash": vae_info["hash"],
"name": vae_info["name"],
"base": vae_info["base"],
"type": vae_info["type"]
}
}
# Build edges
edges = []
# Determine source for UNet and CLIP (model_loader or lora_loader)
unet_source = "lora_loader" if lora_key is not None else "model_loader"
clip_source = "lora_loader" if lora_key is not None else "model_loader"
# Determine source for VAE (vae_loader if specified, otherwise model_loader)
vae_source = "vae_loader" if vae_key is not None else "model_loader"
# If using LoRA, connect model_loader to lora_loader first
if lora_key is not None:
edges.extend([
{
"source": {"node_id": "model_loader", "field": "unet"},
"destination": {"node_id": "lora_loader", "field": "unet"}
},
{
"source": {"node_id": "model_loader", "field": "clip"},
"destination": {"node_id": "lora_loader", "field": "clip"}
}
])
# Note: lora_loader doesn't have a clip2 field, so for SDXL we route clip2 directly from model_loader
# Connect UNet and CLIP to downstream nodes
edges.extend([
# Connect UNet to denoise
{
"source": {"node_id": unet_source, "field": "unet"},
"destination": {"node_id": "denoise", "field": "unet"}
},
# Connect CLIP to prompts
{
"source": {"node_id": clip_source, "field": "clip"},
"destination": {"node_id": "positive_prompt", "field": "clip"}
},
{
"source": {"node_id": clip_source, "field": "clip"},
"destination": {"node_id": "negative_prompt", "field": "clip"}
},
])
# For SDXL models, also connect clip2
# Note: clip2 always comes from model_loader, even when using LoRA (lora_loader doesn't support clip2)
if is_sdxl:
edges.extend([
{
"source": {"node_id": "model_loader", "field": "clip2"},
"destination": {"node_id": "positive_prompt", "field": "clip2"}
},
{
"source": {"node_id": "model_loader", "field": "clip2"},
"destination": {"node_id": "negative_prompt", "field": "clip2"}
},
])
edges.extend([
# Connect prompts to denoise
{
"source": {"node_id": "positive_prompt", "field": "conditioning"},
"destination": {"node_id": "denoise", "field": "positive_conditioning"}
},
{
"source": {"node_id": "negative_prompt", "field": "conditioning"},
"destination": {"node_id": "denoise", "field": "negative_conditioning"}
},
# Connect noise to denoise
{
"source": {"node_id": "noise", "field": "noise"},
"destination": {"node_id": "denoise", "field": "noise"}
},
# Connect denoise to latents_to_image
{
"source": {"node_id": "denoise", "field": "latents"},
"destination": {"node_id": "latents_to_image", "field": "latents"}
},
{
"source": {"node_id": vae_source, "field": "vae"},
"destination": {"node_id": "latents_to_image", "field": "vae"}
},
# Connect latents_to_image to save_image
{
"source": {"node_id": "latents_to_image", "field": "image"},
"destination": {"node_id": "save_image", "field": "image"}
}
])
graph = {
"id": "text2img_graph",
"nodes": nodes,
"edges": edges
}
return graph
@@ -0,0 +1,74 @@
import os
import time
import requests
import base64
from dotenv import load_dotenv
load_dotenv()
API_URL = os.environ["TRELLIS_URL"]
def generate_no_preview(image_base64: str):
"""Generate 3D model from a single base64-encoded image without previews.
Args:
image_base64: Base64 string of the image (without 'data:image/...' prefix)
"""
try:
# Set generation parameters
params = {
'image_base64': image_base64,
'seed': 42,
'ss_guidance_strength': 7.5,
'ss_sampling_steps': 10,
'slat_guidance_strength': 7.5,
'slat_sampling_steps': 10,
'mesh_simplify_ratio': 0.99,
'texture_size': 1024,
#'texture_baking_mode': 'opt',
'texture_opt_total_steps': 1000,
'output_format': 'glb'
}
# Start generation
print("Starting generation...")
response = requests.post(f"{API_URL}/generate_no_preview", data=params)
response.raise_for_status()
# Poll status until complete
while True:
status = requests.get(f"{API_URL}/status").json()
print(f"Progress: {status['progress']}%")
if status['status'] == 'COMPLETE':
break
elif status['status'] == 'FAILED':
raise Exception(f"Generation failed: {status['message']}")
time.sleep(1)
# Download the model
print("Downloading model...")
response = requests.get(f"{API_URL}/download/model")
response.raise_for_status()
return response.content
except Exception as e:
print(f"Error: {str(e)}")
return None
def image_to_3d_trellis(image_path, output_path):
with open(image_path, 'rb') as image_file:
image_data = image_file.read()
base64_encoded = base64.b64encode(image_data).decode('utf-8')
model_binary = generate_no_preview(base64_encoded)
output_file = f"{output_path}.glb"
with open(output_file, 'wb') as f:
f.write(model_binary)
return output_file
@@ -0,0 +1,153 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "1dc6faae",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import base64\n",
"import requests\n",
"from dotenv import load_dotenv"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "b3107275",
"metadata": {},
"outputs": [],
"source": [
"load_dotenv()\n",
"\n",
"ACCOUNT_ID = os.environ[\"CLOUDFLARE_ACCOUNT_ID\"]\n",
"API_TOKEN = os.environ[\"CLOUDFLARE_API_TOKEN\"]"
]
},
{
"cell_type": "markdown",
"id": "999adf95",
"metadata": {},
"source": [
"## Text to image"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "40b35163",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Saved: test_resources/resolution_test_1.jpg (315728 bytes)\n"
]
}
],
"source": [
"# https://developers.cloudflare.com/workers-ai/models/flux-1-schnell/\n",
"\n",
"MODEL = \"@cf/black-forest-labs/flux-1-schnell\"\n",
"URL = f\"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/{MODEL}\"\n",
"\n",
"payload = {\n",
" \"prompt\": \"cyborg crocodile, realistic style, single object, front and side fully visible, plain neutral background, clear details, soft studio lighting, true-to-scale\",\n",
"}\n",
"\n",
"headers = {\n",
" \"Authorization\": f\"Bearer {API_TOKEN}\",\n",
" \"Content-Type\": \"application/json\",\n",
"}\n",
"\n",
"resp = requests.post(URL, json=payload, headers=headers, timeout=60)\n",
"resp.raise_for_status()\n",
"\n",
"data = resp.json()\n",
"b64 = data[\"result\"][\"image\"]\n",
"if not b64:\n",
" raise RuntimeError(f\"Unexpected response structure: {data}\")\n",
"\n",
"img_bytes = base64.b64decode(b64)\n",
"\n",
"out_path = \"test_resources/resolution_test_1.jpg\"\n",
"with open(out_path, \"wb\") as f:\n",
" f.write(img_bytes)\n",
"\n",
"print(f\"Saved: {out_path} ({len(img_bytes)} bytes)\")"
]
},
{
"cell_type": "markdown",
"id": "14a874c4",
"metadata": {},
"source": [
"## Text prompt refinement"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "485f6f46",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\"dark wooden battleaxe with bronze blade\"\n"
]
}
],
"source": [
"MODEL = \"@cf/meta/llama-3.2-3b-instruct\"\n",
"URL = f\"https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/{MODEL}\"\n",
"\n",
"instructions = \"\"\"\n",
"User is talking about some object. Your task is to generate a short and concise description of it. Use only user's own words, keep it as short as possible.\n",
"Example:\n",
"User: 'Umm, okay, I would like a really cool sword, with for example a bright orange crossguard. And also it should be slightly curved.'\n",
"You: 'a slightly curved sword with bright orange crossguard'\n",
"\"\"\"\n",
"prompt = \"Umm, alright, can you please give me an epic battleaxe? It should have a dark wooden shaft and bronze blade.\"\n",
"\n",
"response = requests.post(URL,\n",
" headers={\"Authorization\": f\"Bearer {API_TOKEN}\"},\n",
" json={\n",
" \"messages\": [\n",
" {\"role\": \"system\", \"content\": instructions},\n",
" {\"role\": \"user\", \"content\": prompt}\n",
" ]\n",
" }\n",
")\n",
"data = response.json()\n",
"result_text = data[\"result\"][\"response\"]\n",
"print(result_text)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@@ -0,0 +1,122 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "50e24baa",
"metadata": {},
"outputs": [],
"source": [
"from invokeai_mcp_server import create_text2img_graph, enqueue_graph, wait_for_completion, get_image_url\n",
"from urllib.parse import urljoin\n",
"\n",
"import asyncio"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0407cd9a",
"metadata": {},
"outputs": [],
"source": [
"INVOKEAI_BASE_URL = \"http://127.0.0.1:9090\"\n",
"\n",
"\n",
"async def generate_image(arguments: dict):\n",
"\n",
" # Extract parameters\n",
" prompt = arguments[\"prompt\"]\n",
" negative_prompt = arguments.get(\"negative_prompt\", \"\")\n",
" width = arguments.get(\"width\", 512)\n",
" height = arguments.get(\"height\", 512)\n",
" steps = arguments.get(\"steps\", 30)\n",
" cfg_scale = arguments.get(\"cfg_scale\", 7.5)\n",
" scheduler = arguments.get(\"scheduler\", \"euler\")\n",
" seed = arguments.get(\"seed\")\n",
" model_key = arguments.get(\"model_key\")\n",
" lora_key = arguments.get(\"lora_key\")\n",
" lora_weight = arguments.get(\"lora_weight\", 1.0)\n",
" vae_key = arguments.get(\"vae_key\")\n",
"\n",
" #logger.info(f\"Generating image with prompt: {prompt[:50]}...\")\n",
"\n",
" # Create graph\n",
" graph = await create_text2img_graph(\n",
" prompt=prompt,\n",
" negative_prompt=negative_prompt,\n",
" model_key=model_key,\n",
" lora_key=lora_key,\n",
" lora_weight=lora_weight,\n",
" vae_key=vae_key,\n",
" width=width,\n",
" height=height,\n",
" steps=steps,\n",
" cfg_scale=cfg_scale,\n",
" scheduler=scheduler,\n",
" seed=seed\n",
" )\n",
"\n",
" # Enqueue and wait for completion\n",
" result = await enqueue_graph(graph)\n",
" batch_id = result[\"batch\"][\"batch_id\"]\n",
"\n",
" #logger.info(f\"Enqueued batch {batch_id}, waiting for completion...\")\n",
"\n",
" completed = await wait_for_completion(batch_id)\n",
"\n",
" # Extract image name from result\n",
" if \"result\" in completed and \"outputs\" in completed[\"result\"]:\n",
" outputs = completed[\"result\"][\"outputs\"]\n",
" # Find the image output\n",
" for node_id, output in outputs.items():\n",
" if output.get(\"type\") == \"image_output\":\n",
" image_name = output[\"image\"][\"image_name\"]\n",
" image_url = await get_image_url(image_name)\n",
"\n",
" text=f\"Image generated successfully!\\n\\nImage Name: {image_name}\\nImage URL: {image_url}\\n\\nYou can view the image at: {urljoin(INVOKEAI_BASE_URL, f'/api/v1/images/i/{image_name}/full')}\"\n",
" print(text)\n",
"\n",
" # Fallback if we couldn't find image output\n",
" #text=f\"Image generation completed but output format was unexpected. Batch ID: {batch_id}\\n\\nResult: {json.dumps(completed, indent=2)}\""
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6cf9d879",
"metadata": {},
"outputs": [],
"source": [
"async def main():\n",
" args = {\n",
" \"prompt\": \"a golden katana with a fancy pommel\"\n",
" }\n",
" await generate_image(args)\n",
"\n",
"asyncio.run(main())"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@@ -0,0 +1,152 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "d55eb3ce",
"metadata": {},
"outputs": [],
"source": [
"import requests\n",
"import base64\n",
"import time"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "77b23cd8",
"metadata": {},
"outputs": [],
"source": [
"# API endpoint\n",
"BASE_URL = \"http://127.0.0.1:7960\"\n",
"\n",
"def generate_no_preview(image_base64: str):\n",
" \"\"\"Generate 3D model from a single base64-encoded image without previews.\n",
" \n",
" Args:\n",
" image_base64: Base64 string of the image (without 'data:image/...' prefix)\n",
" \"\"\"\n",
" try:\n",
" # Set generation parameters\n",
" params = {\n",
" 'image_base64': image_base64,\n",
" 'seed': 42,\n",
" 'ss_guidance_strength': 7.5,\n",
" 'ss_sampling_steps': 30,\n",
" 'slat_guidance_strength': 7.5,\n",
" 'slat_sampling_steps': 30,\n",
" 'mesh_simplify_ratio': 0.95,\n",
" 'texture_size': 1024,\n",
" 'output_format': 'glb'\n",
" }\n",
" \n",
" # Start generation\n",
" print(\"Starting generation...\")\n",
" response = requests.post(f\"{BASE_URL}/generate_no_preview\", data=params)\n",
" print(\"Response status:\", response.status_code)\n",
" response.raise_for_status()\n",
" \n",
" # Poll status until complete\n",
" while True:\n",
" status = requests.get(f\"{BASE_URL}/status\").json()\n",
" print(f\"Progress: {status['progress']}%\")\n",
" \n",
" if status['status'] == 'COMPLETE':\n",
" break\n",
" elif status['status'] == 'FAILED':\n",
" raise Exception(f\"Generation failed: {status['message']}\")\n",
" \n",
" time.sleep(1)\n",
" \n",
" # Download the model\n",
" print(\"Downloading model...\")\n",
" response = requests.get(f\"{BASE_URL}/download/model\")\n",
" response.raise_for_status()\n",
" print(\"Model downloaded.\")\n",
" \n",
" return response.content\n",
" \n",
" except Exception as e:\n",
" print(f\"Error: {str(e)}\")\n",
" return None"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "eb122295",
"metadata": {},
"outputs": [],
"source": [
"def generate_model(image_path, output_path):\n",
" with open(image_path, 'rb') as image_file:\n",
" image_data = image_file.read()\n",
"\n",
" base64_encoded = base64.b64encode(image_data).decode('utf-8')\n",
" model = generate_no_preview(base64_encoded)\n",
" \n",
" with open(output_path, 'wb') as f:\n",
" f.write(model)\n",
" print(f\"Model saved to {output_path}\")\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "2ce7dfdf",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Starting generation...\n",
"Response status: 200\n",
"Progress: 100%\n",
"Downloading model...\n",
"Model downloaded.\n",
"Model saved to test_resources/style_test_3_model.glb\n"
]
}
],
"source": [
"\n",
"image_path = 'test_resources/style_test_3.jpg'\n",
"output_path = \"test_resources/style_test_3_model.glb\"\n",
"\n",
"generate_model(image_path, output_path)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a1224d13",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.11"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@@ -0,0 +1,165 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "4826c91d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'2025-10-18-16-35-47'"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from datetime import datetime\n",
"\n",
"datetime.now().strftime(\"%Y-%m-%d-%H-%M-%S\")"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "9419e692",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"STDOUT:\n",
" Device used: cuda\n",
"After Remesh 9998 19996\n",
"\n",
"STDERR:\n",
" D:\\users\\henrisel\\stable-fast-3d\\.venv\\lib\\site-packages\\timm\\models\\layers\\__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers\n",
" warnings.warn(f\"Importing from {__name__} is deprecated, please import via timm.layers\", FutureWarning)\n",
"\n",
" 0%| | 0/1 [00:00<?, ?it/s]\n",
" 0%| | 0/1 [00:00<?, ?it/s]\n",
"Traceback (most recent call last):\n",
" File \"D:\\users\\henrisel\\stable-fast-3d\\run.py\", line 122, in <module>\n",
" mesh, glob_dict = model.run_image(\n",
" File \"D:\\users\\henrisel\\stable-fast-3d\\sf3d\\system.py\", line 286, in run_image\n",
" meshes, global_dict = self.generate_mesh(\n",
" File \"D:\\users\\henrisel\\stable-fast-3d\\sf3d\\system.py\", line 369, in generate_mesh\n",
" rast = self.baker.rasterize(\n",
" File \"D:\\users\\henrisel\\stable-fast-3d\\.venv\\lib\\site-packages\\texture_baker\\baker.py\", line 28, in rasterize\n",
" return torch.ops.texture_baker_cpp.rasterize(\n",
" File \"D:\\users\\henrisel\\stable-fast-3d\\.venv\\lib\\site-packages\\torch\\_ops.py\", line 1243, in __call__\n",
" return self._op(*args, **kwargs)\n",
"NotImplementedError: Could not run 'texture_baker_cpp::rasterize' with arguments from the 'CUDA' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. 'texture_baker_cpp::rasterize' is only available for these backends: [CPU, Meta, BackendSelect, Python, FuncTorchDynamicLayerBackMode, Functionalize, Named, Conjugate, Negative, ZeroTensor, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradMPS, AutogradXPU, AutogradHPU, AutogradLazy, AutogradMTIA, AutogradMAIA, AutogradMeta, Tracer, AutocastCPU, AutocastMTIA, AutocastMAIA, AutocastXPU, AutocastMPS, AutocastCUDA, FuncTorchBatched, BatchedNestedTensor, FuncTorchVmapMode, Batched, VmapMode, FuncTorchGradWrapper, PythonTLSSnapshot, FuncTorchDynamicLayerFrontMode, PreDispatch, PythonDispatcher].\n",
"\n",
"CPU: registered at texture_baker\\csrc\\baker.cpp:543 [kernel]\n",
"Meta: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\MetaFallbackKernel.cpp:23 [backend fallback]\n",
"BackendSelect: fallthrough registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\BackendSelectFallbackKernel.cpp:3 [backend fallback]\n",
"Python: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\PythonFallbackKernel.cpp:194 [backend fallback]\n",
"FuncTorchDynamicLayerBackMode: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\functorch\\DynamicLayer.cpp:479 [backend fallback]\n",
"Functionalize: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\FunctionalizeFallbackKernel.cpp:375 [backend fallback]\n",
"Named: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\NamedRegistrations.cpp:7 [backend fallback]\n",
"Conjugate: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\ConjugateFallback.cpp:17 [backend fallback]\n",
"Negative: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\native\\NegateFallback.cpp:18 [backend fallback]\n",
"ZeroTensor: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\ZeroTensorFallback.cpp:86 [backend fallback]\n",
"ADInplaceOrView: fallthrough registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:104 [backend fallback]\n",
"AutogradOther: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:63 [backend fallback]\n",
"AutogradCPU: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:67 [backend fallback]\n",
"AutogradCUDA: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:75 [backend fallback]\n",
"AutogradXLA: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:87 [backend fallback]\n",
"AutogradMPS: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:95 [backend fallback]\n",
"AutogradXPU: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:71 [backend fallback]\n",
"AutogradHPU: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:108 [backend fallback]\n",
"AutogradLazy: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:91 [backend fallback]\n",
"AutogradMTIA: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:79 [backend fallback]\n",
"AutogradMAIA: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:83 [backend fallback]\n",
"AutogradMeta: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\VariableFallbackKernel.cpp:99 [backend fallback]\n",
"Tracer: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\torch\\csrc\\autograd\\TraceTypeManual.cpp:294 [backend fallback]\n",
"AutocastCPU: fallthrough registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\autocast_mode.cpp:322 [backend fallback]\n",
"AutocastMTIA: fallthrough registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\autocast_mode.cpp:466 [backend fallback]\n",
"AutocastMAIA: fallthrough registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\autocast_mode.cpp:504 [backend fallback]\n",
"AutocastXPU: fallthrough registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\autocast_mode.cpp:542 [backend fallback]\n",
"AutocastMPS: fallthrough registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\autocast_mode.cpp:209 [backend fallback]\n",
"AutocastCUDA: fallthrough registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\autocast_mode.cpp:165 [backend fallback]\n",
"FuncTorchBatched: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\functorch\\LegacyBatchingRegistrations.cpp:731 [backend fallback]\n",
"BatchedNestedTensor: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\functorch\\LegacyBatchingRegistrations.cpp:758 [backend fallback]\n",
"FuncTorchVmapMode: fallthrough registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\functorch\\VmapModeRegistrations.cpp:27 [backend fallback]\n",
"Batched: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\LegacyBatchingRegistrations.cpp:1075 [backend fallback]\n",
"VmapMode: fallthrough registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\VmapModeRegistrations.cpp:33 [backend fallback]\n",
"FuncTorchGradWrapper: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\functorch\\TensorWrapper.cpp:210 [backend fallback]\n",
"PythonTLSSnapshot: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\PythonFallbackKernel.cpp:202 [backend fallback]\n",
"FuncTorchDynamicLayerFrontMode: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\functorch\\DynamicLayer.cpp:475 [backend fallback]\n",
"PreDispatch: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\PythonFallbackKernel.cpp:206 [backend fallback]\n",
"PythonDispatcher: registered at C:\\actions-runner\\_work\\pytorch\\pytorch\\pytorch\\aten\\src\\ATen\\core\\PythonFallbackKernel.cpp:198 [backend fallback]\n",
"\n",
"\n",
"Return Code: 1\n"
]
}
],
"source": [
"import subprocess\n",
"\n",
"MODEL_FOLDER = r\"D:\\users\\henrisel\\stable-fast-3d\"\n",
"PROJECT_FOLDER = r\"D:\\users\\henrisel\\DeltaVR3DModelGeneration\\3d-generation-pipeline\"\n",
"\n",
"# Path to the Python interpreter in the other virtual environment\n",
"venv_python = MODEL_FOLDER + r\"\\.venv\\Scripts\\python.exe\"\n",
"\n",
"# Path to the .py file you want to run\n",
"script_path = MODEL_FOLDER + r\"\\run.py\"\n",
"\n",
"# Optional: arguments to pass to the script\n",
"args = [MODEL_FOLDER + r\"\\demo_files\\examples\\chair1.png\", \"--output-dir\", PROJECT_FOLDER + r\"\\images\"]\n",
"\n",
"# Build the command\n",
"command = [venv_python, script_path] + args\n",
"\n",
"try:\n",
" # Run the subprocess\n",
" result = subprocess.run(command, capture_output=True, text=True)\n",
"\n",
" # Print output and errors\n",
" print(\"STDOUT:\\n\", result.stdout)\n",
" print(\"STDERR:\\n\", result.stderr)\n",
" print(\"Return Code:\", result.returncode)\n",
"\n",
"except Exception as e:\n",
" print(f\"Error occurred: {e}\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ee480ba6",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
+7
View File
@@ -0,0 +1,7 @@
#torch==2.8.0+cu129 https://pytorch.org/get-started/previous-versions/
transformers==4.57.0
git+https://github.com/huggingface/diffusers.git
accelerate==1.10.1
huggingface_hub[hf_xet]==1.1.10
sentencepiece==0.2.1
protobuf==6.32.1
+62
View File
@@ -0,0 +1,62 @@
import argparse
import asyncio
import logging
import time
from pathlib import Path
from datetime import datetime
from dotenv import load_dotenv
from generate_image_local import text_to_image_invoke_ai
from generate_model_local import image_to_3d_trellis
load_dotenv()
def get_timestamp():
return datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
def setup_logger(base_folder, timestamp):
log_dir = base_folder / Path("logs")
log_dir.mkdir(parents=True, exist_ok=True)
logging.basicConfig(
filename=log_dir / f"{timestamp}.log",
level=logging.INFO,
force=True
)
async def main():
parser = argparse.ArgumentParser(description="Text to 3D model pipeline")
parser.add_argument("--prompt", type=str, required=True, help="User text prompt")
args = parser.parse_args()
input_prompt = args.prompt
print(f"Input prompt: {input_prompt}")
image_generation_prompt = input_prompt + ", single object, front and side fully visible, realistic style, plain neutral background, clear details, soft studio lighting, true-to-scale"
pipeline_folder = Path(__file__).resolve().parent
timestamp = get_timestamp()
setup_logger(pipeline_folder, timestamp)
time_checkpoint = time.time()
image_path = pipeline_folder / "images" / f"{timestamp}.jpg"
# TODO: use Invoke AI or Cloudflare, depending on env var
#text_to_image_cloudflare(image_generation_prompt, image_path)
await text_to_image_invoke_ai(image_generation_prompt, image_path)
image_generation_time = time.time() - time_checkpoint
time_checkpoint = time.time()
logging.info(f"Image generation time: {round(image_generation_time, 1)} s")
print(f"Generated image file: {image_path}")
model_path = pipeline_folder / "models" / timestamp
model_file = image_to_3d_trellis(image_path, model_path)
model_generation_time = time.time() - time_checkpoint
logging.info(f"Model generation time: {round(model_generation_time, 1)} s")
print(f"Generated 3D model file: {model_file}")
if __name__ == "__main__":
asyncio.run(main())
+45
View File
@@ -0,0 +1,45 @@
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.XR.Interaction.Toolkit;
public class ActivateTeleportationRay : MonoBehaviour
{
public GameObject teleportRay;
public float rayHideDelay = 0.1f;
public InputActionProperty activateTeleportRay;
public TeleportationProvider teleportationProvider;
// Update is called once per frame
private void Start()
{
teleportRay.SetActive(false);
activateTeleportRay.action.performed += ShowRay;
activateTeleportRay.action.canceled += HideRayPerformed;
teleportationProvider.endLocomotion += HideRayPerformed;
}
private void HideRayPerformed(InputAction.CallbackContext obj)
{
if (!teleportRay.activeSelf) return;
if (IsInvoking(nameof(HideRay))) return;
Invoke(nameof(HideRay), rayHideDelay);
}
private void HideRayPerformed(LocomotionSystem obj)
{
if (!teleportRay.activeSelf) return;
if (IsInvoking(nameof(HideRay))) return;
Invoke(nameof(HideRay), rayHideDelay);
}
private void ShowRay(InputAction.CallbackContext obj)
{
teleportRay.SetActive(true);
}
private void HideRay()
{
teleportRay.SetActive(false);
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f9a0cd93f35359040bf696149b914da4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+107
View File
@@ -0,0 +1,107 @@
using TMPro;
using UnityEngine;
public class Billboard : MonoBehaviour
{
private GameObject _parent;
public string defaultText = "Sample Text";
public TMP_Text tmpText;
public Canvas canvas;
public string prefix = "<mark=#000000BB>";
private Camera _camera;
public LineRenderer lineRenderer;
public Transform lineStart;
private GameObject _lineEndObject;
private MeshFilter _lineEndMeshFilter;
private void Start()
{
_camera = Camera.main;
lineRenderer = GetComponent<LineRenderer>();
_parent = transform.parent.gameObject;
transform.SetParent(null);
tmpText.text = defaultText;
}
private void LateUpdate()
{
if (canvas.enabled) transform.position = _parent.transform.position + (_camera.transform.up * 0.1f);
if (!lineRenderer.enabled) return;
lineRenderer.SetPosition(0, lineStart.position);
lineRenderer.SetPosition(1, CalculateLineEndPosition());
}
private void SetText(string txt)
{
tmpText.text = prefix + txt;
}
private void ShowCanvas()
{
canvas.enabled = true;
lineRenderer.enabled = true;
}
private void HideCanvas()
{
canvas.enabled = false;
lineRenderer.enabled = false;
}
public void ShowHint(string txt)
{
ShowCanvas();
SetText(txt);
}
public void HideHint()
{
HideCanvas();
}
public void SetLineTarget(GameObject newGM)
{
_lineEndObject = newGM;
_lineEndMeshFilter = _lineEndObject.GetComponent<MeshFilter>();
}
private Vector3 CalculateLineEndPosition()
{
if (_lineEndObject == null)
{
lineRenderer.enabled = false;
return Vector3.zero;
}
return _lineEndMeshFilter == null ? _lineEndObject.transform.position : FindClosestVertexToTargetPoint(lineStart.position, _lineEndMeshFilter);
}
private Vector3 FindClosestVertexToTargetPoint(Vector3 start, MeshFilter filter)
{
// Get the Mesh object from the MeshFilter component
Mesh mesh = filter.mesh;
// Get the world position of the point you want to find the closest point on the mesh to
// Transform the point into local space relative to the MeshFilter's transform
Vector3 localPoint = filter.transform.InverseTransformPoint(start);
// Find the closest vertex to the point
float closestDistance = Mathf.Infinity;
Vector3 closestVertex = Vector3.zero;
for (int i = 0; i < mesh.vertexCount; i++)
{
Vector3 vertex = mesh.vertices[i];
float distance = Vector3.Distance(localPoint, vertex);
if (distance < closestDistance)
{
closestDistance = distance;
closestVertex = vertex;
}
}
// Transform the closest vertex back into world space
return filter.transform.TransformPoint(closestVertex);
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 579b0d81f2e914541899696ba12066cc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
-91
View File
@@ -1,91 +0,0 @@
fileFormatVersion: 2
guid: 9e61fd46af9c1f040b404e6d9b3cf24f
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1004
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: a4239de93bf485a4a91f2beae1b61638, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1006
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 58b156c81f6986e49bbc36d148284374, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1007
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: d6a8e60752cb4b94290d8708bdc86941, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1008
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 8944d362ea085fe439dee038bf88e463, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1017
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: dfa6bb7a50147334da12cc47d712c609, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1018
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 1839464057c47e84093d8cf09159b4b3, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1019
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 1cc70f1fed108444eb5db636f03e108e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1020
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: de3814ebbf66c0a489ea8fd934e64f3d, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1022
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: e187a7e2db937384397356c840f1ab55, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1024
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: a6ce84de1eab6cd489bb6856b8556a10, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1026-1031
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 8beb2afd575206946be598f0c844fd57, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1037
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 2d22e6e989ccaf048a270e7315ce0894, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 1038
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: c1f62301b6494ee40a457970e6268ea8, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2001
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 1fb4d61be2a2dbb4596e76912e1d8e12, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2001_boxes1
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: ba4a5c7367e020b4e89ee668a69eec42, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2001_boxes2
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: c2473d27a5939514b93f1bbaefd0b48c, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2001_boxes3
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: ace6110d393cb3047b4fa992e1ab5cc7, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2001_boxes4
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: d5399982b4ecd9a41b82ee8f1c20bc45, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2002
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 7dcd8b5cc91159941987964c0ef8dbec, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2003
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 80750f77ca3f46940a64090b8ef29081, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2004-2005
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 9bc6afc30c404014483d4304b2b152b0, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2006
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 5343720af546fa6428b1e766cd4a42e6, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.165
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2007
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 3f6bca7e3561d0e49bed78652c01616e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.048
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2007_cor
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 94f9a2b67269d9244ad07d514b37b71d, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2008-2009
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: e318ccfc92ef0bb45835fad1c5328d79, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.381
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2009_cor
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: af1afa7201113c94db6e5bec651d6907, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2010-2012
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 0ee8c16f213e7e445b1942d4e2f3aba3, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2013-2016
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: ab69c73926749334aa5e907c9f2120cd, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2017
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 001eda51ab301ed4096fe0c4bb5ed632, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2018
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: a4b1e2a800d2d7f40aeaa81becaa4b88, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2019
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: f6e80e626715ffb4a82fe1c5205c6cd4, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2020
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: bd6c266f662c0a04fbfdf3198d55f7b2, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2021
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: d07f11b01ea59db44aa1893e0a01a054, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2022-2023
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 483aafc26c6afc74db2fba9594f06bb5, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2024
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 68d99d35a036af543b89a891a41f59dd, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2025-2026
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: c1495ca50a5a440448ed73e4effa9844, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2027
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 8c0305165b05e3b4a867c189f3dbaf29, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2028-2029
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 9c57404605cfb14449542f38a9ead969, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2030-2032
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 722d440788e89094481aaa992b317034, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2034-2035
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 54a46c038d6a38441b396bf4ca064301, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2036
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 87a55afc135c4f74b92fde21a7e35c0d, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2037-2038
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 24f87bf38fbf1ac4c8428d3dec2cb21f, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2039-2040
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 52aabfd46ceb00046ac63f76ef1fcbe4, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2041-2044
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: ec7fb22974deff8458bd6d17e039ea72, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2045
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 3e1c3b2f45cd19246bc3d34eab398527, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2046
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 10236fb0566cad648a1fd4aaca7edf27, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2047
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: a58879db54cb5c9448d8a2083083f98e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2048
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: c8b78fcedf6ca3842988af762cca4a9f, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2049
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 8ca66258f505ede49948c3cd58cb3369, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2049_cor
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: cd36310f6cc988244aaee50ab8e37e26, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2050
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 7a458587a800bc6408cf8c154a6ed09a, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.504
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: 2051-2053
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 0aca967d3ac907f4aa9b221f43ba2553, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.254
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: lib
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 9dbf78976db936746b2bca955d8ee3ed, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: other place
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: d010d573482e70a45a4348c475619c53, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: seats
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 8a27779ef18b2c74ba75ba5edb7a9911, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: seats2
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: a8f0e63043568ad49a6adbf22cf2f1c4, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: wc.
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 113b26e5e48a52a4898cca1b253d6f2e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
-28
View File
@@ -1,28 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: wcc
m_Shader: {fileID: 4800000, guid: edd85db7d8699da40a7ac38aedd0d1f6, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: e2f808625c2b6cf409a0b30b36bb5d1e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Transparency: 0.071
m_Colors: []
Binary file not shown.
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3d9bdb6046f8fd44c9d9a030de25e326
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
BIN
View File
Binary file not shown.
+108
View File
@@ -0,0 +1,108 @@
fileFormatVersion: 2
guid: 7bdf251001bf92141b95f513371a742c
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 1
materialName: 1
materialSearch: 2
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 1
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 0
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1bce6688863f39c458863d0bb7abf5ec
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 927bb5171dc1b0048896f6f3cf7c435b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,61 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Mm]emoryCaptures/
# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta
# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory
.vs/
# Gradle cache directory
.gradle/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta
*.meta
# Unity3D generated file on crash reports
sysinfo.txt
# Builds
*.apk
*.unitypackage
# Crashlytics generated file
crashlytics-build.properties
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Winterbolt Games
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,311 @@
using FishNet.Managing;
using FishNet.Managing.Logging;
using FishNet.Transporting;
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
namespace FishNet.Discovery
{
/// <summary>
/// A component that advertises a server or searches for servers.
/// </summary>
public sealed class NetworkDiscovery : MonoBehaviour
{
/// <summary>
/// A string that differentiates your application/game from others.
/// <b>Must not</b> be null, empty, or blank.
/// </summary>
[SerializeField]
[Tooltip("A string that differentiates your application/game from others. Must not be null, empty, or blank.")]
private string secret;
/// <summary>
/// The port number used by this <see cref="NetworkDiscovery"/> component.
/// <b>Must</b> be different from the one used by the <seealso cref="Transport"/>.
/// </summary>
[SerializeField]
[Tooltip("The port number used by this NetworkDiscovery component. Must be different from the one used by the Transport.")]
private ushort port;
/// <summary>
/// How often does this <see cref="NetworkDiscovery"/> component advertises a server or searches for servers.
/// </summary>
[SerializeField]
[Tooltip("How often does this NetworkDiscovery component advertises a server or searches for servers.")]
private float discoveryInterval;
/// <summary>
/// Whether this <see cref="NetworkDiscovery"/> component will automatically start/stop? <b>Setting this to true is recommended.</b>
/// </summary>
[SerializeField]
[Tooltip("Whether this NetworkDiscovery component will automatically start/stop? Setting this to true is recommended.")]
private bool automatic;
/// <summary>
/// The <see cref="UdpClient"/> used to advertise the server.
/// </summary>
private UdpClient _serverUdpClient;
/// <summary>
/// The <see cref="UdpClient"/> used to search for servers.
/// </summary>
private UdpClient _clientUdpClient;
/// <summary>
/// Whether this <see cref="NetworkDiscovery"/> component is currently advertising a server or not.
/// </summary>
public bool IsAdvertising => _serverUdpClient != null;
/// <summary>
/// Whether this <see cref="NetworkDiscovery"/> component is currently searching for servers or not.
/// </summary>
public bool IsSearching => _clientUdpClient != null;
/// <summary>
/// An <see cref="Action"/> that is invoked by this <seealso cref="NetworkDiscovery"/> component whenever a server is found.
/// </summary>
public event Action<IPEndPoint> ServerFoundCallback;
private void Start()
{
if (automatic)
{
InstanceFinder.ServerManager.OnServerConnectionState += ServerConnectionStateChangedHandler;
InstanceFinder.ClientManager.OnClientConnectionState += ClientConnectionStateChangedHandler;
StartSearchingForServers();
}
}
private void OnDisable()
{
InstanceFinder.ServerManager.OnServerConnectionState -= ServerConnectionStateChangedHandler;
InstanceFinder.ClientManager.OnClientConnectionState -= ClientConnectionStateChangedHandler;
StopAdvertisingServer();
StopSearchingForServers();
}
private void OnDestroy()
{
InstanceFinder.ServerManager.OnServerConnectionState -= ServerConnectionStateChangedHandler;
InstanceFinder.ClientManager.OnClientConnectionState -= ClientConnectionStateChangedHandler;
StopAdvertisingServer();
StopSearchingForServers();
}
private void OnApplicationQuit()
{
InstanceFinder.ServerManager.OnServerConnectionState -= ServerConnectionStateChangedHandler;
InstanceFinder.ClientManager.OnClientConnectionState -= ClientConnectionStateChangedHandler;
StopAdvertisingServer();
StopSearchingForServers();
}
#region Connection State Handlers
private void ServerConnectionStateChangedHandler(ServerConnectionStateArgs args)
{
if (args.ConnectionState == LocalConnectionState.Starting)
{
StopSearchingForServers();
}
else if (args.ConnectionState == LocalConnectionState.Started)
{
StartAdvertisingServer();
}
else if (args.ConnectionState == LocalConnectionState.Stopping)
{
//StopAdvertisingServer();
}
else if (args.ConnectionState == LocalConnectionState.Stopped)
{
StartSearchingForServers();
}
}
private void ClientConnectionStateChangedHandler(ClientConnectionStateArgs args)
{
if (args.ConnectionState == LocalConnectionState.Starting)
{
StopSearchingForServers();
}
else if (args.ConnectionState == LocalConnectionState.Stopped)
{
StartSearchingForServers();
}
}
#endregion
#region Server
/// <summary>
/// Makes this <see cref="NetworkDiscovery"/> component start advertising a server.
/// </summary>
public void StartAdvertisingServer()
{
//Debug.Log("NetworkDiscovery is advertizing on port " + port);
if (!InstanceFinder.IsServer)
{
if (NetworkManager.StaticCanLog(LoggingType.Warning)) Debug.LogWarning("Unable to start advertising server. Server is inactive.", this);
return;
}
if (_serverUdpClient != null)
{
if (NetworkManager.StaticCanLog(LoggingType.Common)) Debug.Log("Server is already being advertised.", this);
return;
}
if (port == InstanceFinder.TransportManager.Transport.GetPort())
{
if (NetworkManager.StaticCanLog(LoggingType.Warning)) Debug.LogWarning("Unable to start advertising server on the same port as the transport.", this);
return;
}
_serverUdpClient = new UdpClient(port)
{
EnableBroadcast = true,
MulticastLoopback = false,
};
//Debug.Log("UDP = " + _serverUdpClient.ToString());
Task.Run(AdvertiseServerAsync);
if (NetworkManager.StaticCanLog(LoggingType.Common)) Debug.Log("Started advertising server.", this);
}
/// <summary>
/// Makes this <see cref="NetworkDiscovery"/> component <i>immediately</i> stop advertising the server it is currently advertising.
/// </summary>
public void StopAdvertisingServer()
{
if (_serverUdpClient == null) return;
_serverUdpClient.Close();
_serverUdpClient = null;
if (NetworkManager.StaticCanLog(LoggingType.Common)) Debug.Log("Stopped advertising server.", this);
}
private async void AdvertiseServerAsync()
{
while (_serverUdpClient != null)
{
await Task.Delay(TimeSpan.FromSeconds(discoveryInterval));
UdpReceiveResult result = await _serverUdpClient.ReceiveAsync();
Debug.Log("Awaiting for server");
string receivedSecret = Encoding.UTF8.GetString(result.Buffer);
Debug.Log(receivedSecret);
if (receivedSecret == secret)
{
byte[] okBytes = BitConverter.GetBytes(true);
await _serverUdpClient.SendAsync(okBytes, okBytes.Length, result.RemoteEndPoint);
}
}
Debug.Log("_serverUdpClient == null");
}
#endregion
#region Client
/// <summary>
/// Makes this <see cref="NetworkDiscovery"/> component start searching for servers.
/// </summary>
public void StartSearchingForServers()
{
// if (InstanceFinder.IsServer)
// {
// if (NetworkManager.StaticCanLog(LoggingType.Warning)) Debug.LogWarning("Unable to start searching for servers. Server is active.", this);
//
// return;
// }
Debug.Log("NetworkDiscovery is searching");
if (InstanceFinder.IsClient)
{
if (NetworkManager.StaticCanLog(LoggingType.Warning)) Debug.LogWarning("Unable to start searching for servers. Client is active.", this);
return;
}
if (_clientUdpClient != null)
{
if (NetworkManager.StaticCanLog(LoggingType.Common)) Debug.Log("Already searching for servers.", this);
return;
}
_clientUdpClient = new UdpClient()
{
EnableBroadcast = true,
MulticastLoopback = false,
};
Task.Run(SearchForServersAsync);
if (NetworkManager.StaticCanLog(LoggingType.Common)) Debug.Log("Started searching for servers.", this);
}
/// <summary>
/// Makes this <see cref="NetworkDiscovery"/> component <i>immediately</i> stop searching for servers.
/// </summary>
public void StopSearchingForServers()
{
if (_clientUdpClient == null) return;
_clientUdpClient.Close();
_clientUdpClient = null;
if (NetworkManager.StaticCanLog(LoggingType.Common)) Debug.Log("Stopped searching for servers.", this);
}
private async void SearchForServersAsync()
{
byte[] secretBytes = Encoding.UTF8.GetBytes(secret);
IPEndPoint endPoint = new IPEndPoint(IPAddress.Broadcast, port);
while (_clientUdpClient != null)
{
await Task.Delay(TimeSpan.FromSeconds(discoveryInterval));
await _clientUdpClient.SendAsync(secretBytes, secretBytes.Length, endPoint);
UdpReceiveResult result = await _clientUdpClient.ReceiveAsync();
if (BitConverter.ToBoolean(result.Buffer, 0))
{
ServerFoundCallback?.Invoke(result.RemoteEndPoint);
StopSearchingForServers();
}
}
}
#endregion
}
}
@@ -0,0 +1,257 @@
using _PROJECT.NewHandPresence;
using FishNet;
using FishNet.Discovery;
using FishNet.Managing.Scened;
using FishNet.Object;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Net;
using TMPro;
using Unity.XR.CoreUtils;
using UnityEngine;
using UnityEngine.UI;
public class NetworkMenuUI : MonoBehaviour
{
private ConcurrentQueue<System.Action> mainThreadQueue = new();
[Header("UI References")]
public Toggle VRToggle;
public Button startPlayingButton;
public Button reloadButton;
public Button joinMultiplayerButton;
public Transform serverListContainer;
public GameObject serverListItemPrefab;
public TMP_Text statusText;
public Button quitButton;
[Header("Networking")]
public NetworkDiscovery networkDiscovery;
public Camera uiCamera;
public AudioListener placeholderAudioListener;
private bool _useVR;
//public Image coverImage;
private readonly List<IPEndPoint> foundServers = new();
private void Start()
{
if (networkDiscovery == null)
networkDiscovery = FindObjectOfType<NetworkDiscovery>();
_useVR = PlayerPrefs.GetInt("UseVR", 0) == 1;
VRToggle.isOn = _useVR;
// React to UI toggle changes
VRToggle.onValueChanged.AddListener((isOn) =>
{
_useVR = isOn;
PlayerPrefs.SetInt("UseVR", _useVR ? 1 : 0);
PlayerPrefs.Save();
Debug.Log($"UseVR set to {_useVR}");
});
startPlayingButton.onClick.AddListener(OnStartPlaying);
reloadButton.onClick.AddListener(OnReload);
joinMultiplayerButton.onClick.AddListener(OnJoinMultiplayer);
quitButton.onClick.AddListener(OnQuit);
networkDiscovery.ServerFoundCallback += (endPoint) =>
{
Debug.Log("Found a server");
// Only queue the endpoint for main-thread processing
mainThreadQueue.Enqueue(() =>
{
StartCoroutine(ProcessServerFound(endPoint));
});
};
}
private void Update()
{
while (mainThreadQueue.TryDequeue(out var action))
{
action.Invoke(); // safely runs on main thread
}
}
private void OnStartPlaying()
{
statusText.text = "Starting host...";
StartCoroutine(HostAndSearchRoutine());
}
private void OnReload()
{
/*if (!InstanceFinder.IsClient)
{
Debug.LogWarning("Reload can only be called from a client!");
return;
}
// Use the ClientManager.Objects dictionary
foreach (NetworkObject obj in InstanceFinder.ClientManager.Objects.)
{
if (obj.IsOwner) // This ensures it's YOUR local player
{
var xr = obj.GetComponentInChildren<XROrigin>();
if (xr != null)
{
Debug.Log("Found my XR Origin player.");
TutorialController tutorial = xr.GetComponent<TutorialController>();
if (tutorial != null)
{
tutorial._state = TutorialController.TutorialState.Initializing;
}
}
else
{
Debug.Log("My local player is not an XR Origin.");
}
}
}*/
}
private void OnJoinMultiplayer()
{
statusText.text = "Searching for servers...";
networkDiscovery.StopSearchingForServers();
ClearServerList();
//Debug.Log(foundServers.Count);
foundServers.Clear();
//Debug.Log(foundServers.Count);
networkDiscovery.StartSearchingForServers();
}
private void OnQuit()
{
Debug.Log("Quitting application");
Application.Quit();
}
private IEnumerator ProcessServerFound(IPEndPoint endPoint)
{
Debug.Log("server found");
//Debug.Log(endPoint.Address.ToString());
//Debug.Log(foundServers.Count);
if (foundServers.Contains(endPoint)) yield return null;
foundServers.Add(endPoint);
Debug.Log($"Server found {endPoint}");
// Auto-join if started as host
if (InstanceFinder.IsServer)
{
Debug.Log("Server is local");
//networkDiscovery.StopAdvertisingServer();
networkDiscovery.StopSearchingForServers();
uiCamera.enabled = false;
Debug.Log("Disabled placeholder audio source");
placeholderAudioListener.enabled = false;
//coverImage.gameObject.SetActive(false);
InstanceFinder.ClientManager.StartConnection(endPoint.Address.ToString());
statusText.text = $"Joined server: {endPoint.Address}";
yield return null;
}
Debug.Log("Server is foregin");
GameObject item = Instantiate(serverListItemPrefab, serverListContainer);
TMP_Text label = item.GetComponentInChildren<TMP_Text>();
if (label != null)
label.text = endPoint.Address.ToString();
Button btn = item.GetComponent<Button>();
btn.onClick.RemoveAllListeners(); // clear any old listener
btn.onClick.AddListener(() =>
{
networkDiscovery.StopSearchingForServers();
if (uiCamera != null) uiCamera.enabled = false;
if (placeholderAudioListener != null)
{
Debug.Log("Disabled placeholder audio source");
placeholderAudioListener.enabled = false;
}
//coverImage.gameObject.SetActive(false);
InstanceFinder.ClientManager.StartConnection(endPoint.Address.ToString());
statusText.text = $"Joined server: {endPoint.Address}";
});
}
private Coroutine joinRoutine;
private IEnumerator HostAndSearchRoutine()
{
// Step 1: Start hosting
InstanceFinder.ServerManager.StartConnection();
// Step 2: Start advertising
yield return new WaitForSeconds(0.5f); // Let the server settle
networkDiscovery.StartAdvertisingServer();
// Step 3: Begin searching
yield return new WaitForSeconds(0.5f); // Let advertisement initialize
networkDiscovery.StartSearchingForServers();
// Step 4: Try to find and join a better server
yield return new WaitForSeconds(0.5f); // Give discovery a moment
StartJoinRoutine();
}
public void StartJoinRoutine()
{
if (joinRoutine != null) StopCoroutine(joinRoutine);
joinRoutine = StartCoroutine(TryJoinServerRepeatedly());
}
private IEnumerator TryJoinServerRepeatedly()
{
float timeout = 10f;
float timer = 0f;
while (timer < timeout)
{
if (foundServers.Count > 0)
{
var firstServer = foundServers[0];
//networkDiscovery.StopAdvertisingServer();
if (uiCamera != null) uiCamera.enabled = false;
if (placeholderAudioListener != null)
{
Debug.Log("Disabled placeholder audio source");
placeholderAudioListener.enabled = false;
}
networkDiscovery.StopSearchingForServers();
InstanceFinder.ClientManager.StartConnection(firstServer.Address.ToString());
statusText.text = $"Joined server: {firstServer.Address}";
//coverImage.gameObject.SetActive(false);
yield break;
}
statusText.text = $"Searching for servers... ({Mathf.FloorToInt(timer)}s)";
yield return new WaitForSeconds(1f);
timer += 1f;
}
statusText.text = "No servers found. Acting as host.";
// You can optionally start your own server here
}
private void ClearServerList()
{
foreach (Transform child in serverListContainer)
{
Destroy(child.gameObject);
}
}
}
@@ -0,0 +1,117 @@
using System.Collections.Generic;
using System.Net;
using UnityEngine;
namespace FishNet.Discovery
{
public sealed class NetworkDiscoveryHUD : MonoBehaviour
{
[SerializeField]
private NetworkDiscovery networkDiscovery;
private Camera _camera;
private readonly List<IPEndPoint> _endPoints = new List<IPEndPoint>();
private Vector2 _serversListScrollVector;
private bool _useVR;
private void Start()
{
if (networkDiscovery == null) networkDiscovery = FindObjectOfType<NetworkDiscovery>();
_camera = GetComponentInChildren<Camera>();
_useVR = PlayerPrefs.GetInt("UseVR", 0) == 1;
networkDiscovery.ServerFoundCallback += (endPoint) =>
{
if (!_endPoints.Contains(endPoint)) _endPoints.Add(endPoint);
};
}
private void OnGUI()
{
GUILayoutOption buttonHeight = GUILayout.Height(30.0f);
using (new GUILayout.AreaScope(new Rect(Screen.width - 240.0f - 10.0f, 10.0f, 240.0f, Screen.height - 20.0f)))
{
GUILayout.Box("Settings");
using (new GUILayout.HorizontalScope())
{
bool useVRNew = GUILayout.Toggle(_useVR, "Use VR");
if (useVRNew != _useVR)
{
_useVR = useVRNew;
PlayerPrefs.SetInt("UseVR", _useVR ? 1 : 0);
Debug.Log($"UseVR set to {_useVR}");
}
}
GUILayout.Box("Server");
using (new GUILayout.HorizontalScope())
{
if (GUILayout.Button("Start", buttonHeight)) InstanceFinder.ServerManager.StartConnection();
if (GUILayout.Button("Stop", buttonHeight)) InstanceFinder.ServerManager.StopConnection(true);
}
GUILayout.Box("Advertising");
using (new GUILayout.HorizontalScope())
{
if (networkDiscovery.IsAdvertising)
{
if (GUILayout.Button("Stop", buttonHeight)) networkDiscovery.StopAdvertisingServer();
}
else
{
if (GUILayout.Button("Start", buttonHeight)) networkDiscovery.StartAdvertisingServer();
}
}
GUILayout.Box("Searching");
using (new GUILayout.HorizontalScope())
{
if (networkDiscovery.IsSearching)
{
if (GUILayout.Button("Stop", buttonHeight)) networkDiscovery.StopSearchingForServers();
}
else
{
if (GUILayout.Button("Start", buttonHeight)) networkDiscovery.StartSearchingForServers();
}
}
if (_endPoints.Count > 0)
{
GUILayout.Box("Servers");
using (new GUILayout.ScrollViewScope(_serversListScrollVector))
{
for (int i = 0; i < _endPoints.Count; i++)
{
string ipAddress = _endPoints[i].Address.ToString();
if (GUILayout.Button(ipAddress))
{
//networkDiscovery.StopAdvertisingServer();
networkDiscovery.StopSearchingForServers();
_camera.enabled = false;
InstanceFinder.ClientManager.StartConnection(ipAddress);
}
}
}
}
}
}
}
}
@@ -0,0 +1,48 @@
# Fish-Networking-Discovery
A very simple LAN network discovery component for Fish-Networking ([Asset Store](https://assetstore.unity.com/packages/tools/network/fish-net-networking-evolved-207815) | [GitHub](https://github.com/FirstGearGames/FishNet))
### Getting Started (GUI)
1. Download the code in this repo as a zip
2. Extract the code inside your project folder **(FISH-NETWORKING MUST BE ALREADY INSTALLED)**
3. Create an empty game object
4. Add a `NetworkManager` component to the game object you just created
5. Add a `NetworkDiscovery` component to the game object you just created
6. Set the `secret`, `port`, and `discoveryInterval` fields
7. Add a `NetworkDiscoveryHUD` component
8. Enter play mode
- If you want to begin advertising a server
1. Press "Start" under the "Server" group
2. Press "Start" under the "Advertising" group
- If you want to stop advertising a server
- Press "Stop" under the "Advertising" group
- If you want to begin searching for servers
- Press "Start" under the "Searching" group
- If you want to stop searching for servers
- Press "Stop" under the "Searching" group
### Getting Started (Code)
1. Download the code in this repo as a zip
2. Extract the code inside your project folder **(FISH-NETWORKING MUST BE ALREADY INSTALLED)**
3. Create an empty game object
4. Add a `NetworkManager` component to the game object you just created
5. Add a `NetworkDiscovery` component to the game object you just created
6. Set the `secret`, `port`, and `discoveryInterval` fields
7. Enter play mode
- If you want begin advertising a server
1. Call `InstanceFinder.ServerManager.StartConnection()`
2. Call `FindObjectOfType<NetworkDiscovery>().StartAdvertisingServer()`
- If you want to stop advertising a server
- Call `FindObjectOfType<NetworkDiscovery>().StopAdvertisingServer()`
- If you want to start searching for servers
- Call `FindObjectOfType<NetworkDiscovery>().StartSearchingForServers()`
- If you want to stop seaching for servers
- Call `FindObjectOfType<NetworkDiscovery>().StopSearchingForServers()`
### Planned Features
- [x] Automatically start/stop advertising server
- [ ] Automatically remove servers that are no longer alive
- [ ] Introduce Unity coroutines for all `NetworkDiscovery` methods
@@ -0,0 +1,261 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1243484539689895160
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6102112898136418063}
- component: {fileID: 4162166102933070300}
- component: {fileID: 8982425673842065088}
- component: {fileID: 6642303600386318624}
m_Layer: 5
m_Name: Server List item prefab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6102112898136418063
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1243484539689895160}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.2, y: 1.2, z: 1.2}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 6068593683225063891}
m_Father: {fileID: 0}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4162166102933070300
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1243484539689895160}
m_CullTransparentMesh: 1
--- !u!114 &8982425673842065088
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1243484539689895160}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &6642303600386318624
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1243484539689895160}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 0.21698111, g: 0.21698111, b: 0.21698111, a: 1}
m_HighlightedColor: {r: 0.21960784, g: 0.21960784, b: 0.21960784, a: 1}
m_PressedColor: {r: 0.21960784, g: 0.21960784, b: 0.21960784, a: 1}
m_SelectedColor: {r: 0.21960784, g: 0.21960784, b: 0.21960784, a: 1}
m_DisabledColor: {r: 0.21960784, g: 0.21960784, b: 0.21960784, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 8982425673842065088}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &8712802155540729905
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6068593683225063891}
- component: {fileID: 767001398382591515}
- component: {fileID: 730381457657509126}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6068593683225063891
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8712802155540729905}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 6102112898136418063}
m_RootOrder: -1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &767001398382591515
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8712802155540729905}
m_CullTransparentMesh: 1
--- !u!114 &730381457657509126
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8712802155540729905}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: ...
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 20
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e477d8f6ecb6084418a205a9893b6e13
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bbb4974b4302f435b9f4663c64d8f803
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 206db668838ebc34b90ae36be24ce3be
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
using FishNet.CodeGenerating.Helping.Extension;
using MonoFN.Cecil.Cil;
namespace FishNet.CodeGenerating.Extension
{
internal static class ILProcessorExtensions
{
/// <summary>
/// Creates a variable type within the body and returns it's VariableDef.
/// </summary>
internal static VariableDefinition CreateVariable(this ILProcessor processor, CodegenSession session, System.Type variableType)
{
return processor.Body.Method.CreateVariable(session, variableType);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 127d8312da53b3e49ba9e3e4c6348857
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,131 @@
using FishNet.CodeGenerating.Helping.Extension;
using MonoFN.Cecil;
using MonoFN.Cecil.Rocks;
using MonoFN.Collections.Generic;
using System.Collections.Generic;
namespace FishNet.CodeGenerating.Extension
{
internal static class MethodDefinitionExtensions
{
/// <summary>
/// Returns the proper OpCode to use for call methods.
/// </summary>
public static MonoFN.Cecil.Cil.OpCode GetCallOpCode(this MethodDefinition md)
{
if (md.Attributes.HasFlag(MethodAttributes.Virtual))
return MonoFN.Cecil.Cil.OpCodes.Callvirt;
else
return MonoFN.Cecil.Cil.OpCodes.Call;
}
/// <summary>
/// Returns the proper OpCode to use for call methods.
/// </summary>
public static MonoFN.Cecil.Cil.OpCode GetCallOpCode(this MethodReference mr, CodegenSession session)
{
return mr.CachedResolve(session).GetCallOpCode();
}
/// <summary>
/// Adds otherMd parameters to thisMR and returns added parameters.
/// </summary>
public static List<ParameterDefinition> CreateParameters(this MethodReference thisMr, CodegenSession session, MethodDefinition otherMd)
{
return thisMr.CachedResolve(session).CreateParameters(session, otherMd);
}
/// <summary>
/// Adds otherMr parameters to thisMR and returns added parameters.
/// </summary>
public static List<ParameterDefinition> CreateParameters(this MethodReference thisMr, CodegenSession session, MethodReference otherMr)
{
return thisMr.CachedResolve(session).CreateParameters(session, otherMr.CachedResolve(session));
}
/// <summary>
/// Adds otherMd parameters to thisMd and returns added parameters.
/// </summary>
public static List<ParameterDefinition> CreateParameters(this MethodDefinition thisMd, CodegenSession session, MethodDefinition otherMd)
{
List<ParameterDefinition> results = new List<ParameterDefinition>();
foreach (ParameterDefinition pd in otherMd.Parameters)
{
session.ImportReference(pd.ParameterType);
int currentCount = thisMd.Parameters.Count;
string name = (pd.Name + currentCount);
ParameterDefinition parameterDef = new ParameterDefinition(name, pd.Attributes, pd.ParameterType);
//Set any default values.
parameterDef.Constant = pd.Constant;
parameterDef.IsReturnValue = pd.IsReturnValue;
parameterDef.IsOut = pd.IsOut;
foreach (CustomAttribute item in pd.CustomAttributes)
parameterDef.CustomAttributes.Add(item);
parameterDef.HasConstant = pd.HasConstant;
parameterDef.HasDefault = pd.HasDefault;
thisMd.Parameters.Add(parameterDef);
results.Add(parameterDef);
}
return results;
}
/// <summary>
/// Returns a method reference while considering if declaring type is generic.
/// </summary>
public static MethodReference GetMethodReference(this MethodDefinition md, CodegenSession session)
{
MethodReference methodRef = session.ImportReference(md);
//Is generic.
if (md.DeclaringType.HasGenericParameters)
{
GenericInstanceType git = methodRef.DeclaringType.MakeGenericInstanceType();
MethodReference result = new MethodReference(md.Name, md.ReturnType)
{
HasThis = md.HasThis,
ExplicitThis = md.ExplicitThis,
DeclaringType = git,
CallingConvention = md.CallingConvention,
};
foreach (ParameterDefinition pd in md.Parameters)
{
session.ImportReference(pd.ParameterType);
result.Parameters.Add(pd);
}
return result;
}
else
{
return methodRef;
}
}
/// <summary>
/// Returns a method reference for a generic method.
/// </summary>
public static MethodReference GetMethodReference(this MethodDefinition md, CodegenSession session, TypeReference typeReference)
{
MethodReference methodRef = session.ImportReference(md);
return methodRef.GetMethodReference(session, typeReference);
}
/// <summary>
/// Returns a method reference for a generic method.
/// </summary>
public static MethodReference GetMethodReference(this MethodDefinition md, CodegenSession session, TypeReference[] typeReferences)
{
MethodReference methodRef = session.ImportReference(md);
return methodRef.GetMethodReference(session, typeReferences);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 866ed457fe28c3e4b9698d87b9abd709
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,254 @@
using FishNet.CodeGenerating.Helping.Extension;
using MonoFN.Cecil;
namespace FishNet.CodeGenerating.Extension
{
internal static class TypeDefinitionExtensions
{
/// <summary>
/// Returns if a TypeDefinition is nullable.
/// </summary>
public static bool IsNullable(this TypeDefinition td)
{
return (td.Name == typeof(System.Nullable<>).Name);
}
public static MethodReference GetMethodReferenceInBase(this TypeDefinition td, CodegenSession session, string methodName)
{
MethodDefinition baseMd = td.GetMethodDefinitionInBase(session, methodName);
if (baseMd == null)
return null;
MethodReference baseMr;
TypeReference baseTr = td.BaseType;
if (baseTr.CachedResolve(session).HasGenericParameters)
{
GenericInstanceType git = (GenericInstanceType)baseTr;
baseMr = new MethodReference(baseMd.Name, baseMd.ReturnType, git)
{
HasThis = baseMd.HasThis,
CallingConvention = baseMd.CallingConvention,
ExplicitThis = baseMd.ExplicitThis,
};
foreach (ParameterDefinition pd in baseMd.Parameters)
{
session.ImportReference(pd.ParameterType);
baseMr.Parameters.Add(pd);
}
}
else
{
baseMr = session.ImportReference(baseMd);
}
return baseMr;
}
/// <summary>
/// Returns a method in the next base class.
/// </summary>
public static MethodDefinition GetMethodDefinitionInBase(this TypeDefinition td, CodegenSession session, string methodName)
{
if (td.BaseType == null)
{
session.LogError($"BaseType for {td.FullName} is null.");
return null;
}
TypeDefinition baseTd = td.BaseType.CachedResolve(session);
return baseTd.GetMethod(methodName);
}
/// <summary>
/// Returns a method in the next base class.
/// </summary>
public static MethodReference GetMethodReference(this TypeDefinition td, CodegenSession session, string methodName)
{
MethodDefinition md = td.GetMethod(methodName);
//Not found.
if (md == null)
return null;
return md.GetMethodReference(session);
}
/// <summary>
/// Gets a MethodReference or creates one if missing.
/// </summary>
public static MethodReference GetOrCreateMethodReference(this TypeDefinition td, CodegenSession session, string methodName, MethodAttributes attributes, TypeReference returnType, out bool created)
{
MethodDefinition md = td.GetMethod(methodName);
//Not found.
if (md == null)
{
md = new MethodDefinition(methodName, attributes, returnType);
td.Methods.Add(md);
created = true;
}
else
{
created = false;
}
return md.GetMethodReference(session);
}
/// <summary>
/// Gets a MethodDefinition or creates one if missing.
/// </summary>
public static MethodDefinition GetOrCreateMethodDefinition(this TypeDefinition td, CodegenSession session, string methodName, MethodAttributes attributes, TypeReference returnType, out bool created)
{
MethodDefinition md = td.GetMethod(methodName);
//Not found.
if (md == null)
{
md = new MethodDefinition(methodName, attributes, returnType);
td.Methods.Add(md);
created = true;
}
else
{
created = false;
}
return md;
}
/// <summary>
/// Gets a MethodDefinition or creates one if missing.
/// </summary>
public static MethodDefinition GetOrCreateMethodDefinition(this TypeDefinition td, CodegenSession session, string methodName, MethodDefinition methodTemplate, bool copyParameters, out bool created)
{
MethodDefinition md = td.GetMethod(methodName);
//Not found.
if (md == null)
{
TypeReference returnType = session.ImportReference(methodTemplate.ReturnType);
md = new MethodDefinition(methodName, methodTemplate.Attributes, returnType)
{
ExplicitThis = methodTemplate.ExplicitThis,
AggressiveInlining = methodTemplate.AggressiveInlining,
Attributes = methodTemplate.Attributes,
CallingConvention = methodTemplate.CallingConvention,
HasThis = methodTemplate.HasThis,
};
md.Body.InitLocals = methodTemplate.Body.InitLocals;
if (copyParameters)
{
foreach (ParameterDefinition pd in methodTemplate.Parameters)
md.Parameters.Add(pd);
}
td.Methods.Add(md);
created = true;
}
else
{
created = false;
}
return md;
}
/// <summary>
/// Returns a method in any inherited classes. The first found method is returned.
/// </summary>
public static MethodDefinition GetMethodDefinitionInAnyBase(this TypeDefinition td, CodegenSession session, string methodName)
{
while (td != null)
{
foreach (MethodDefinition md in td.Methods)
{
if (md.Name == methodName)
return md;
}
try
{
td = td.GetNextBaseTypeDefinition(session);
}
catch
{
return null;
}
}
return null;
}
/// <summary>
/// Returns the next base type.
/// </summary>
public static TypeDefinition GetNextBaseTypeDefinition(this TypeDefinition typeDef, CodegenSession session)
{
return (typeDef.BaseType == null) ? null : typeDef.BaseType.CachedResolve(session);
}
/// <summary>
/// Creates a FieldReference.
/// </summary>
public static FieldReference CreateFieldReference(this FieldDefinition fd, CodegenSession session)
{
FieldReference fr;
TypeDefinition declaringType = fd.DeclaringType;
//Is generic.
if (declaringType.HasGenericParameters)
{
GenericInstanceType git = new GenericInstanceType(declaringType);
foreach (GenericParameter item in declaringType.GenericParameters)
git.GenericArguments.Add(item);
fr = new FieldReference(fd.Name, fd.FieldType, git);
return fr;
}
//Not generic.
else
{
return session.ImportReference(fd);
}
}
/// <summary>
/// Gets a FieldReference or creates it if missing.
/// </summary>
public static FieldReference GetOrCreateFieldReference(this TypeDefinition td, CodegenSession session, string fieldName, FieldAttributes attributes, TypeReference fieldTypeRef, out bool created)
{
FieldReference fr = td.GetFieldReference(fieldName, session);
if (fr == null)
{
fr = td.CreateFieldDefinition(session, fieldName, attributes, fieldTypeRef);
created = true;
}
else
{
created = false;
}
return fr;
}
/// <summary>
/// Creates a FieldReference.
/// </summary>
public static FieldReference CreateFieldDefinition(this TypeDefinition td, CodegenSession session, string fieldName, FieldAttributes attributes, TypeReference fieldTypeRef)
{
FieldDefinition fd = new FieldDefinition(fieldName, attributes, fieldTypeRef);
td.Fields.Add(fd);
return fd.CreateFieldReference(session);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c9f00cf3dc8b90b469c3c9cb8b87fc88
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More